JsonReaderWriterFactory.CreateJsonReader Method (Stream, XmlDictionaryReaderQuotas)

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

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

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

Syntax

'Declaration
Public Shared Function CreateJsonReader ( _
    stream As Stream, _
    quotas As XmlDictionaryReaderQuotas _
) As XmlDictionaryReader
public static XmlDictionaryReader CreateJsonReader(
    Stream stream,
    XmlDictionaryReaderQuotas quotas
)

Parameters

Return Value

Type: System.Xml.XmlDictionaryReader
An XmlDictionaryReader that can read JSON.

Exceptions

Exception Condition
ArgumentNullException

stream is nulla null reference (Nothing in Visual Basic).

Remarks

The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read.

Setting XmlDictionaryReaderQuotas to Max in Silverlight 5 applications effectively disables the use of quotas.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.