JsonObject.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Add(KeyValuePair<String,JsonNode>) |
Adds the specified property to the JsonObject. |
Add(String, JsonNode) |
Adds an element with the provided property name and value to the JsonObject. |
Add(KeyValuePair<String,JsonNode>)
- Source:
- JsonObject.IDictionary.cs
- Source:
- JsonObject.IDictionary.cs
- Source:
- JsonObject.IDictionary.cs
Adds the specified property to the 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))
Parameters
- property
- KeyValuePair<String,JsonNode>
The KeyValuePair structure representing the property name and value to add to the JsonObject.
Implements
Exceptions
An element with the same property name already exists in the JsonObject.
The property name of property
is null
.
Applies to
Add(String, JsonNode)
- Source:
- JsonObject.IDictionary.cs
- Source:
- JsonObject.IDictionary.cs
- Source:
- JsonObject.IDictionary.cs
Adds an element with the provided property name and value to the 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)
Parameters
- propertyName
- String
The property name of the element to add.
- value
- JsonNode
The value of the element to add.
Implements
Exceptions
propertyName
is null
.
An element with the same property name already exists in the JsonObject.
Applies to
.NET