AddJsonMember

AddJsonMember 1:

This method adds a JSON member to a JSON object.

Syntax

METHOD AddJsonMember: SJsonValue
VAR_INPUT
  v       : SJsonValue;
END_VAR
VAR_IN_OUT CONSTANT
  member  : STRING;
  rawJson : STRING;
END_VAR

AddJsonMember 2: Return value

Name

Type

AddJsonMember

SJsonValue (note possible invalidity)

AddJsonMember 3: Inputs

Name

Type

v

SJsonValue (note possible invalidity)

AddJsonMember 4:/AddJsonMember 5: Inputs/outputs

Name

Type

member

STRING

rawJson

STRING

Sample call:

jsonDoc := fbJson.ParseDocument(sExistingJsonDocument);
jsonMem := fbJson.AddJsonMember(jsonDoc, 'TestJson', sJson);