Export (0) Print
Expand All

DataContractJsonSerializer.WriteObjectContent Method

Writes the content of an object to XML that may be mapped to JavaScript Object Notation (JSON)., without writing the wrapping element.

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 WriteObjectContent(XmlDictionaryWriter, Object) Writes the XML content that can be mapped to JavaScript Object Notation (JSON) using an XmlDictionaryWriter. (Overrides XmlObjectSerializer.WriteObjectContent(XmlDictionaryWriter, Object).)
Public method WriteObjectContent(XmlWriter, Object) Writes the XML content that can be mapped to JavaScript Object Notation (JSON) using an XmlWriter. (Overrides XmlObjectSerializer.WriteObjectContent(XmlWriter, Object).)
Top

When inheriting from the XmlObjectSerializer abstract class, the WriteStartObject, WriteObjectContent, and WriteEndObject methods must be overridden. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end.

The WriteStartObject, Serialization, [DataContractJsonSerializer.WriteObjectContent], and WriteEndObject methods can be used in succession to write the complete object. This is equivalent to calling WriteEndObject.

Note that this method is intended for advanced scenarios when working with XML mapped from JSON.

Show:
© 2014 Microsoft