JsonObject(IEnumerableJsonProperty, Boolean) Constructor

Initializes a new instance of the JsonObject class from a collection of JsonProperty items.

Definition

Namespace: KGySoft.Json
Assembly: KGySoft.Json (in KGySoft.Json.dll) Version: 3.0.0
C#
public JsonObject(
	IEnumerable<JsonProperty> properties,
	bool allowDuplicates = true
)

Parameters

properties  IEnumerableJsonProperty
The properties to be added to this JsonObject.
allowDuplicates  Boolean  (Optional)
to allow duplicate multiple elements with the same Name; to overwrite recurring names with the latest value. This parameter is optional.
Default value: .

Exceptions

ArgumentNullExceptionThe properties parameter is .
ArgumentExceptionThe properties parameter contains a JsonProperty with  Name.

See Also