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.

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

NameDescription
System_CAPS_pubmethodWriteObjectContent(XmlDictionaryWriter, Object)

Writes the XML content that can be mapped to JavaScript Object Notation (JSON) using an XmlDictionaryWriter.(Overrides XmlObjectSerializer.WriteObjectContent(XmlDictionaryWriter, Object).)

System_CAPS_pubmethodWriteObjectContent(XmlWriter, Object)

Writes the XML content that can be mapped to JavaScript Object Notation (JSON) using an XmlWriter.(Overrides XmlObjectSerializer.WriteObjectContent(XmlWriter, Object).)

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, 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.

Return to top
Show: