Json Writer Initializer. Set Output(Stream, Encoding, Boolean) Method
public: void SetOutput(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, bool ownsStream);
public void SetOutput (System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream);
abstract member SetOutput : System.IO.Stream * System.Text.Encoding * bool -> unit
Public Sub SetOutput (stream As Stream, encoding As Encoding, ownsStream As Boolean)
true, the output stream is closed by the writer when done; otherwise
The XmlDictionaryWriter objects created by the CreateJsonWriter methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same XmlDictionaryWriter object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the SetOutput(Stream, Encoding, Boolean) method.
The writers created by JsonReaderWriterFactory can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings.