Click or drag to resize
JsonObjectGetOrAddArray Method
Gets value stored under given key and casts it to array. If key does not exist new empty array is added to the specified key.

Namespace: Dextronet.Jsonie
Assembly: Dextronet.Jsonie (in Dextronet.Jsonie.dll) Version: 1.0.0.0
Syntax
public JsonArray GetOrAddArray(
	string key
)

Parameters

key
Type: SystemString
The key of the member to get.

Return Value

Type: JsonArray
The value stored under given key casted to JsonArray.
Exceptions
ExceptionCondition
ArgumentNullExceptionkey is null.
InvalidCastExceptionIf property with given key exist and is not of JsonArray.
Examples
Dim myInnerArray = myObject.GetOrAddArray("inner") myInnerArray.Add(True)
See Also