JObjectHelperEnsureArrayExists Method

Returns a reference to an array object at the specified property within an object. Creating the array if the property is not yet set. Throws an exception if a non-array value already exists at the property.

Definition

Namespace: MFiles.VAF.Configuration.JsonMapping
Assembly: MFiles.VAF.Configuration (in MFiles.VAF.Configuration.dll) Version: 23.12.13247.3
C#
public JArray EnsureArrayExists(
	JObject jObj,
	string propName
)

Parameters

jObj  JObject
The object that should contain a property with an array.
propName  String
The name of the property where the array should exist.

Return Value

JArray
A reference to the property's array value.

See Also