JsonReaderWriterFactory Class

 

Produces instances of XmlDictionaryReader that can read data encoded with JavaScript Object Notation (JSON) from a stream or buffer and map it to an XML Infoset and instances of XmlDictionaryWriter that can map an XML Infoset to JSON and write JSON-encoded data to a stream.

Namespace:   System.Runtime.Serialization.Json
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

System.Object
  System.Runtime.Serialization.Json.JsonReaderWriterFactory

[<AbstractClass>]
[<Sealed>]
type JsonReaderWriterFactory = class end

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)

Creates an XmlDictionaryReader that can map buffers encoded with JavaScript Object Notation (JSON), with a specified size and offset and character encoding, to an XML Infoset.

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas)

Creates an XmlDictionaryReader that can map buffers encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset.

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonReader(Byte[], XmlDictionaryReaderQuotas)

Creates an XmlDictionaryReader that can map buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset.

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)

Creates an XmlDictionaryReader that can map streams encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset.

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonReader(Stream, XmlDictionaryReaderQuotas)

Creates an XmlDictionaryReader that can map streams encoded with JavaScript Object Notation (JSON) to an XML Infoset.

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonWriter(Stream)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonWriter(Stream, Encoding)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonWriter(Stream, Encoding, Boolean)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonWriter(Stream, Encoding, Boolean, Boolean)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateJsonWriter(Stream, Encoding, Boolean, Boolean, String)

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

Windows Communication Foundation (WCF) processes JSON messages using a mapping between JSON data and the XML Infoset. Normally, this mapping is hidden from view. However, in some advanced scenarios it may be necessary to manually convert between JSON and XML. In this case, the JsonReaderWriterFactory class can be used to create the necessary XML readers and writers. Note that not every XML Infoset element can be mapped to JSON. For more information about mapping, see How to: Serialize and Deserialize JSON Data.

.NET Framework
Available since 3.5
Silverlight
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: