JsonObject.Add Metoda

Definicja

Przeciążenia

Add(KeyValuePair<String,JsonNode>)

Dodaje określoną właściwość do obiektu JsonObject.

Add(String, JsonNode)

Dodaje element z podaną nazwą właściwości i wartością JsonObjectdo elementu .

Add(KeyValuePair<String,JsonNode>)

Źródło:
JsonObject.IDictionary.cs
Źródło:
JsonObject.IDictionary.cs
Źródło:
JsonObject.IDictionary.cs

Dodaje określoną właściwość do obiektu JsonObject.

public:
 virtual void Add(System::Collections::Generic::KeyValuePair<System::String ^, System::Text::Json::Nodes::JsonNode ^> property);
public void Add (System.Collections.Generic.KeyValuePair<string,System.Text.Json.Nodes.JsonNode?> property);
abstract member Add : System.Collections.Generic.KeyValuePair<string, System.Text.Json.Nodes.JsonNode> -> unit
override this.Add : System.Collections.Generic.KeyValuePair<string, System.Text.Json.Nodes.JsonNode> -> unit
Public Sub Add (property As KeyValuePair(Of String, JsonNode))

Parametry

property
KeyValuePair<String,JsonNode>

Struktura KeyValuePair reprezentująca nazwę i wartość właściwości do dodania JsonObjectdo elementu .

Implementuje

Wyjątki

Element o tej samej nazwie właściwości już istnieje w pliku JsonObject.

Nazwa property właściwości to null.

Dotyczy

Add(String, JsonNode)

Źródło:
JsonObject.IDictionary.cs
Źródło:
JsonObject.IDictionary.cs
Źródło:
JsonObject.IDictionary.cs

Dodaje element z podaną nazwą właściwości i wartością JsonObjectdo elementu .

public:
 virtual void Add(System::String ^ propertyName, System::Text::Json::Nodes::JsonNode ^ value);
public void Add (string propertyName, System.Text.Json.Nodes.JsonNode? value);
abstract member Add : string * System.Text.Json.Nodes.JsonNode -> unit
override this.Add : string * System.Text.Json.Nodes.JsonNode -> unit
Public Sub Add (propertyName As String, value As JsonNode)

Parametry

propertyName
String

Nazwa właściwości elementu do dodania.

value
JsonNode

Wartość elementu do dodania.

Implementuje

Wyjątki

propertyNameto null.

Element o tej samej nazwie właściwości już istnieje w pliku JsonObject.

Dotyczy