Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
JsonReaderWriterFactory Class

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.ServiceModel.Web (in System.ServiceModel.Web.dll)

public static class JsonReaderWriterFactory

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 JSON Serialization.


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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5

Community Additions

© 2015 Microsoft