DataContractJsonSerializer.ReadObject DataContractJsonSerializer.ReadObject DataContractJsonSerializer.ReadObject DataContractJsonSerializer.ReadObject Method

Definition

Deserializes JSON (JavaScript Object Notation) data and returns the deserialized object.

Overloads

ReadObject(Stream) ReadObject(Stream) ReadObject(Stream)

Reads a document stream in the JSON (JavaScript Object Notation) format and returns the deserialized object.

ReadObject(XmlDictionaryReader) ReadObject(XmlDictionaryReader) ReadObject(XmlDictionaryReader) ReadObject(XmlDictionaryReader)

Reads the XML document mapped from JSON (JavaScript Object Notation) with an XmlDictionaryReader and returns the deserialized object.

ReadObject(XmlReader) ReadObject(XmlReader) ReadObject(XmlReader) ReadObject(XmlReader)

Reads the XML document mapped from JSON (JavaScript Object Notation) with an XmlReader and returns the deserialized object.

ReadObject(XmlDictionaryReader, Boolean) ReadObject(XmlDictionaryReader, Boolean) ReadObject(XmlDictionaryReader, Boolean) ReadObject(XmlDictionaryReader, Boolean)

Reads the XML document mapped from JSON with an XmlDictionaryReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

ReadObject(XmlReader, Boolean) ReadObject(XmlReader, Boolean) ReadObject(XmlReader, Boolean) ReadObject(XmlReader, Boolean)

Reads an XML document mapped from JSON with an XmlReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

ReadObject(Stream) ReadObject(Stream) ReadObject(Stream)

Reads a document stream in the JSON (JavaScript Object Notation) format and returns the deserialized object.

public:
 override System::Object ^ ReadObject(System::IO::Stream ^ stream);
public override object ReadObject (System.IO.Stream stream);
override this.ReadObject : System.IO.Stream -> obj

Parameters

stream
Stream Stream Stream Stream

The Stream to be read.

Returns

The deserialized object.

ReadObject(XmlDictionaryReader) ReadObject(XmlDictionaryReader) ReadObject(XmlDictionaryReader) ReadObject(XmlDictionaryReader)

Reads the XML document mapped from JSON (JavaScript Object Notation) with an XmlDictionaryReader and returns the deserialized object.

public:
 override System::Object ^ ReadObject(System::Xml::XmlDictionaryReader ^ reader);
public override object ReadObject (System.Xml.XmlDictionaryReader reader);
override this.ReadObject : System.Xml.XmlDictionaryReader -> obj
Public Overrides Function ReadObject (reader As XmlDictionaryReader) As Object

Parameters

reader
XmlDictionaryReader XmlDictionaryReader XmlDictionaryReader XmlDictionaryReader

An XmlDictionaryReader used to read the XML document mapped from JSON.

Returns

The deserialized object.

ReadObject(XmlReader) ReadObject(XmlReader) ReadObject(XmlReader) ReadObject(XmlReader)

Reads the XML document mapped from JSON (JavaScript Object Notation) with an XmlReader and returns the deserialized object.

public:
 override System::Object ^ ReadObject(System::Xml::XmlReader ^ reader);
public override object ReadObject (System.Xml.XmlReader reader);
override this.ReadObject : System.Xml.XmlReader -> obj
Public Overrides Function ReadObject (reader As XmlReader) As Object

Parameters

reader
XmlReader XmlReader XmlReader XmlReader

An XmlReader used to read the XML document mapped from JSON.

Returns

The deserialized object.

ReadObject(XmlDictionaryReader, Boolean) ReadObject(XmlDictionaryReader, Boolean) ReadObject(XmlDictionaryReader, Boolean) ReadObject(XmlDictionaryReader, Boolean)

Reads the XML document mapped from JSON with an XmlDictionaryReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

public:
 override System::Object ^ ReadObject(System::Xml::XmlDictionaryReader ^ reader, bool verifyObjectName);
public override object ReadObject (System.Xml.XmlDictionaryReader reader, bool verifyObjectName);
override this.ReadObject : System.Xml.XmlDictionaryReader * bool -> obj
Public Overrides Function ReadObject (reader As XmlDictionaryReader, verifyObjectName As Boolean) As Object

Parameters

reader
XmlDictionaryReader XmlDictionaryReader XmlDictionaryReader XmlDictionaryReader

An XmlDictionaryReader used to read the XML document mapped from JSON.

verifyObjectName
Boolean Boolean Boolean Boolean

true to check whether the enclosing XML element name and namespace correspond to the expected name and namespace; otherwise, false to skip the verification. The default is true.

Returns

The deserialized object.

ReadObject(XmlReader, Boolean) ReadObject(XmlReader, Boolean) ReadObject(XmlReader, Boolean) ReadObject(XmlReader, Boolean)

Reads an XML document mapped from JSON with an XmlReader and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

public:
 override System::Object ^ ReadObject(System::Xml::XmlReader ^ reader, bool verifyObjectName);
public override object ReadObject (System.Xml.XmlReader reader, bool verifyObjectName);
override this.ReadObject : System.Xml.XmlReader * bool -> obj
Public Overrides Function ReadObject (reader As XmlReader, verifyObjectName As Boolean) As Object

Parameters

reader
XmlReader XmlReader XmlReader XmlReader

An XmlReader used to read the XML document mapped from JSON.

verifyObjectName
Boolean Boolean Boolean Boolean

true to check whether the enclosing XML element name and namespace correspond to the expected name and namespace; otherwise, false, which skips the verification. The default is true.

Returns

The deserialized object.

Applies to