JsonObject Constructors

Definition

Overloads

JsonObject(Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonObject class that is empty.

JsonObject(IEnumerable<KeyValuePair<String,JsonNode>>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonObject class that contains the specified properties.

JsonObject(Nullable<JsonNodeOptions>)

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

Initializes a new instance of the JsonObject class that is empty.

C#
public JsonObject(System.Text.Json.Nodes.JsonNodeOptions? options = default);

Parameters

options
Nullable<JsonNodeOptions>

Options to control the behavior.

Applies to

.NET 10 and other versions
Product Versions
.NET 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

JsonObject(IEnumerable<KeyValuePair<String,JsonNode>>, Nullable<JsonNodeOptions>)

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

Initializes a new instance of the JsonObject class that contains the specified properties.

C#
public JsonObject(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Text.Json.Nodes.JsonNode?>> properties, System.Text.Json.Nodes.JsonNodeOptions? options = default);

Parameters

properties
IEnumerable<KeyValuePair<String,JsonNode>>

The properties to be added.

options
Nullable<JsonNodeOptions>

Options to control the behavior.

Applies to

.NET 10 and other versions
Product Versions
.NET 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)