DataContractJsonSerializer.WriteStartObject Method

Definition

Writes the opening XML element for serializing an object to XML that can be mapped to JavaScript Object Notation (JSON).

Overloads

WriteStartObject(XmlDictionaryWriter, Object)

Writes the opening XML element for serializing an object to XML that can be mapped to JavaScript Object Notation (JSON) using an XmlDictionaryWriter.

WriteStartObject(XmlWriter, Object)

Writes the opening XML element for serializing an object to XML that can be mapped to JavaScript Object Notation (JSON) using an XmlWriter.

WriteStartObject(XmlDictionaryWriter, Object)

Source:
DataContractJsonSerializer.cs
Source:
DataContractJsonSerializer.cs
Source:
DataContractJsonSerializer.cs

Writes the opening XML element for serializing an object to XML that can be mapped to JavaScript Object Notation (JSON) using an XmlDictionaryWriter.

C#
public override void WriteStartObject(System.Xml.XmlDictionaryWriter writer, object? graph);
C#
public override void WriteStartObject(System.Xml.XmlDictionaryWriter writer, object graph);

Parameters

writer
XmlDictionaryWriter

The XmlDictionaryWriter used to write the XML start element.

graph
Object

The object to write.

Applies to

.NET 10 i druge verzije
Proizvod Verzije
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteStartObject(XmlWriter, Object)

Source:
DataContractJsonSerializer.cs
Source:
DataContractJsonSerializer.cs
Source:
DataContractJsonSerializer.cs

Writes the opening XML element for serializing an object to XML that can be mapped to JavaScript Object Notation (JSON) using an XmlWriter.

C#
public override void WriteStartObject(System.Xml.XmlWriter writer, object? graph);
C#
public override void WriteStartObject(System.Xml.XmlWriter writer, object graph);

Parameters

writer
XmlWriter

The XmlWriter used to write the XML start element.

graph
Object

The object to write.

Applies to

.NET 10 i druge verzije
Proizvod Verzije
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1