Export (0) Print
Expand All

JsonReaderWriterFactory.CreateJsonReader Method (Byte[], XmlDictionaryReaderQuotas)

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)

public static XmlDictionaryReader CreateJsonReader(
	byte[] buffer,
	XmlDictionaryReaderQuotas quotas
)

Parameters

buffer
Type: System.Byte[]
The input Byte buffer array from which to read.
quotas
Type: System.Xml.XmlDictionaryReaderQuotas
The XmlDictionaryReaderQuotas must be set to Max in Silverlight 5 applications used to prevent Denial of Service (DoS) attacks when reading untrusted data.

Return Value

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

ExceptionCondition
ArgumentNullException

buffer is null.

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.

Silverlight

Supported in: 5, 4, 3

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

Community Additions

ADD
Show:
© 2014 Microsoft