GetJson

GetJson 1:

This method returns the value of a property as data type STRING(255), if this is a JSON document itself. With longer strings, the method will return a NULL string. In this case the method CopyJson() must be used.

Syntax

METHOD GetJson : STRING(255)
VAR_INPUT
  v : SJsonValue;
END_VAR

GetJson 2: Return value

Name

Type

GetJson

STRING(255)

GetJson 3: Inputs

Name

Type

v

SJsonValue (note possible invalidity)

Sample call:

jsonDoc  := fbJson.ParseDocument(sExistingJsonDocument);
jsonProp := fbJson.FindMember(jsonDoc, 'property');
sJson    := fbJson.GetJson(jsonProp);