This topic has not yet been rated - Rate this topic

DataContractJsonSerializer.WriteObject Method

Serializes an object to a JavaScript Object Notation (JSON) document.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method WriteObject(Stream, Object) Serializes a specified object to JavaScript Object Notation (JSON) data and writes the resulting JSON to a stream. (Overrides XmlObjectSerializer.WriteObject(Stream, Object).)
Public method WriteObject(XmlDictionaryWriter, Object) Serializes an object to XML that may be mapped to JavaScript Object Notation (JSON). Writes all the object data, including the starting XML element, content, and closing element, with an XmlDictionaryWriter. (Overrides XmlObjectSerializer.WriteObject(XmlDictionaryWriter, Object).)
Public method WriteObject(XmlWriter, Object) Serializes an object to XML that may be mapped to JavaScript Object Notation (JSON). Writes all the object data, including the starting XML element, content, and closing element, with an XmlWriter. (Overrides XmlObjectSerializer.WriteObject(XmlWriter, Object).)
Top

Some overloads of this method deal with XML. These overloads are only intended for advanced scenarios when working with the XML/JSON mapping.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ