Export (0) Print
Expand All

JsonReaderWriterFactory.CreateJsonReader Method (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.

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

public static XmlDictionaryReader CreateJsonReader(
	Stream stream,
	Encoding encoding,
	XmlDictionaryReaderQuotas quotas,
	OnXmlDictionaryReaderClose onClose
)

Parameters

stream
Type: System.IO.Stream
The input Stream from which to read.
encoding
Type: System.Text.Encoding
The Encoding that specifies the character encoding used by the reader. If null is specified as the value, the reader attempts to auto-detect the encoding.
quotas
Type: System.Xml.XmlDictionaryReaderQuotas
The XmlDictionaryReaderQuotas used to prevent Denial of Service attacks when reading untrusted data.
onClose
Type: System.Xml.OnXmlDictionaryReaderClose
The OnXmlDictionaryReaderClose delegate to call when the reader is closed.

Return Value

Type: System.Xml.XmlDictionaryReader
An XmlDictionaryReader that can read JavaScript Object Notation (JSON).

For more information about using XmlDictionaryReaderQuotas to prevent Denial of Service attacks when reading untrusted data, see Security Considerations for Data.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2014 Microsoft