JsonReaderWriterFactory.CreateJsonWriter Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

Creates an XmlDictionaryWriter that writes data encoded with JSON to a stream.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public methodStatic member CreateJsonWriter(Stream) Creates an XmlDictionaryWriter that writes data encoded with JSON to a stream using a UTF-8 character encoding.
Public methodStatic member CreateJsonWriter(Stream, Encoding) Creates an XmlDictionaryWriter that writes data encoded with JSON to a stream with a specified character encoding.
Public methodStatic member CreateJsonWriter(Stream, Encoding, Boolean) Creates an XmlDictionaryWriter that writes data encoded with JSON to a stream with a specified character encoding and that specifies whether the output stream is closed by the writer when it is done.

Top

Remarks

The CreateJsonWriter() static method returns an instance of an XmlDictionaryWriter that can map an XML Infoset to a JSON stream. The XmlDictionaryWriter is not guaranteed to produce valid JSON. If it is used in a way not supported by the JSON-XML mapping, it may either throw an exception or write an invalid JSON document.