DataContractJsonSerializer.WriteObjectContent DataContractJsonSerializer.WriteObjectContent DataContractJsonSerializer.WriteObjectContent DataContractJsonSerializer.WriteObjectContent Method

Definition

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

Overloads

WriteObjectContent(XmlDictionaryWriter, Object) WriteObjectContent(XmlDictionaryWriter, Object) WriteObjectContent(XmlDictionaryWriter, Object) WriteObjectContent(XmlDictionaryWriter, Object)

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

WriteObjectContent(XmlWriter, Object) WriteObjectContent(XmlWriter, Object) WriteObjectContent(XmlWriter, Object) WriteObjectContent(XmlWriter, Object)

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

WriteObjectContent(XmlDictionaryWriter, Object) WriteObjectContent(XmlDictionaryWriter, Object) WriteObjectContent(XmlDictionaryWriter, Object) WriteObjectContent(XmlDictionaryWriter, Object)

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

public:
 override void WriteObjectContent(System::Xml::XmlDictionaryWriter ^ writer, System::Object ^ graph);
public override void WriteObjectContent (System.Xml.XmlDictionaryWriter writer, object graph);
override this.WriteObjectContent : System.Xml.XmlDictionaryWriter * obj -> unit
Public Overrides Sub WriteObjectContent (writer As XmlDictionaryWriter, graph As Object)

Parameters

graph
Object Object Object Object

The object to write.

Exceptions

The type being serialized does not conform to data contract rules. For example, the DataContractAttribute attribute has not been applied to the type.

The maximum number of objects to serialize has been exceeded. Check the MaxItemsInObjectGraph property.

WriteObjectContent(XmlWriter, Object) WriteObjectContent(XmlWriter, Object) WriteObjectContent(XmlWriter, Object) WriteObjectContent(XmlWriter, Object)

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

public:
 override void WriteObjectContent(System::Xml::XmlWriter ^ writer, System::Object ^ graph);
public override void WriteObjectContent (System.Xml.XmlWriter writer, object graph);
override this.WriteObjectContent : System.Xml.XmlWriter * obj -> unit
Public Overrides Sub WriteObjectContent (writer As XmlWriter, graph As Object)

Parameters

writer
XmlWriter XmlWriter XmlWriter XmlWriter

The XmlWriter used to write to.

graph
Object Object Object Object

The object to write.

Exceptions

The type being serialized does not conform to data contract rules. For example, the DataContractAttribute attribute has not been applied to the type.

The maximum number of objects to serialize has been exceeded. Check the MaxItemsInObjectGraph property.

Applies to