JsonObject.Add Método

Definición

Sobrecargas

Add(KeyValuePair<String,JsonNode>)

Agrega la propiedad especificada a .JsonObject

Add(String, JsonNode)

Agrega un elemento con el nombre de propiedad y el valor proporcionados a .JsonObject

Add(KeyValuePair<String,JsonNode>)

Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs

Agrega la propiedad especificada a .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))

Parámetros

property
KeyValuePair<String,JsonNode>

Estructura KeyValuePair que representa el nombre de propiedad y el valor que se van a agregar a JsonObject.

Implementaciones

Excepciones

Ya existe un elemento con el mismo nombre de propiedad en .JsonObject

El nombre de propiedad de property es null.

Se aplica a

Add(String, JsonNode)

Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs

Agrega un elemento con el nombre de propiedad y el valor proporcionados a .JsonObject

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)

Parámetros

propertyName
String

Nombre de propiedad del elemento que se va a agregar.

value
JsonNode

Valor del elemento que se va a agregar.

Implementaciones

Excepciones

El valor de propertyName es null.

Ya existe un elemento con el mismo nombre de propiedad en .JsonObject

Se aplica a