JsonObjectGetOrAddTJsonValue Method |
Gets the member stored under given key and casts it to desired type. If key does not exist specified value is
stored as a new member.
Namespace: Dextronet.JsonieAssembly: Dextronet.Jsonie (in Dextronet.Jsonie.dll) Version: 1.0.0.0
Syntax public TJsonValue GetOrAdd<TJsonValue>(
string key,
TJsonValue addValue
)
where TJsonValue : JsonValue
Public Function GetOrAdd(Of TJsonValue As JsonValue) (
key As String,
addValue As TJsonValue
) As TJsonValue
Parameters
- key
- Type: SystemString
The key of the member to get. - addValue
- Type: TJsonValue
The value to add if specified member does not exist.
Type Parameters
- TJsonValue
- Type of the value to get.
Return Value
Type:
TJsonValueThe value stored under given key casted to the TJsonValue.
Exceptions See Also