GetArraySize
This method returns the number of elements in a JSON array.
Syntax
METHOD GetArraySize : UDINT
VAR_INPUT
v : SJsonValue;
END_VAR
Return value
Name | Type |
---|---|
GetArraySize | UDINT |
Inputs
Name | Type |
---|---|
v | SJsonValue (note possible invalidity) |
Sample call:
jsonDoc := fbJson.ParseDocument(sExistingJsonDocument);
jsonArray := fbJson.FindMember(jsonDoc, 'array');
nSize := fbJson.GetArraySize(jsonArray);