共用方式為


DataContractJsonSerializer.WriteStartObject 方法

定義

寫入開頭 XML 項目,將物件序列化為可以對應至 JavaScript 物件標記法 (JSON) 的 XML。

多載

WriteStartObject(XmlDictionaryWriter, Object)

使用 XmlDictionaryWriter 寫入開頭 XML 項目,將物件序列化為可以對應至 JavaScript 物件標記法 (JSON) 的 XML。

WriteStartObject(XmlWriter, Object)

使用 XmlWriter 寫入開頭 XML 項目,將物件序列化為可以對應至 JavaScript 物件標記法 (JSON) 的 XML。

WriteStartObject(XmlDictionaryWriter, Object)

來源:
DataContractJsonSerializer.cs
來源:
DataContractJsonSerializer.cs
來源:
DataContractJsonSerializer.cs

使用 XmlDictionaryWriter 寫入開頭 XML 項目,將物件序列化為可以對應至 JavaScript 物件標記法 (JSON) 的 XML。

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

參數

writer
XmlDictionaryWriter

用於寫入 XML 開始項目的 XmlDictionaryWriter

graph
Object

要寫入的物件。

適用於

WriteStartObject(XmlWriter, Object)

來源:
DataContractJsonSerializer.cs
來源:
DataContractJsonSerializer.cs
來源:
DataContractJsonSerializer.cs

使用 XmlWriter 寫入開頭 XML 項目,將物件序列化為可以對應至 JavaScript 物件標記法 (JSON) 的 XML。

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

參數

writer
XmlWriter

用於寫入 XML 開始項目的 XmlWriter

graph
Object

要寫入的物件。

適用於