GetArraySize

GetArraySize 1:

This method returns the number of elements in a JSON array.

Syntax

METHOD GetArraySize : UDINT
VAR_INPUT
  v : SJsonValue;
END_VAR

GetArraySize 2: Return value

Name

Type

GetArraySize

UDINT

GetArraySize 3: Inputs

Name

Type

v

SJsonValue (note possible invalidity)

Sample call:

jsonDoc   := fbJson.ParseDocument(sExistingJsonDocument);
jsonArray := fbJson.FindMember(jsonDoc, 'array');
nSize     := fbJson.GetArraySize(jsonArray);