Aracılığıyla paylaş


JsonReaderWriterFactory.CreateJsonReader Method (array<Byte[], XmlDictionaryReaderQuotas)

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

Creates an XmlDictionaryReader that can map a specified buffer 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 ( _
    buffer As Byte(), _
    quotas As XmlDictionaryReaderQuotas _
) As XmlDictionaryReader
public static XmlDictionaryReader CreateJsonReader(
    byte[] buffer,
    XmlDictionaryReaderQuotas quotas
)

Parameters

  • buffer
    Type: array<System.Byte[]
    The input Byte buffer array from which to read.

Return Value

Type: System.Xml.XmlDictionaryReader
An XmlDictionaryReader that can process JavaScript Object Notation (JSON) data from the buffer specified.

Exceptions

Exception Condition
ArgumentNullException

buffer 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.