ParseInstance
ParseInstance parses a JSON string.
Syntax
ParseInstance OBJECT With JSON_OBJECT
OBJECTis the object used to parse to parse the input JSON.JSON_OBJECTis the JSON string to be parsed (ClobFile recommended).
Example
# Procedure to parse a JSON object
Local Clbfile SRCJSON
SRCJSON = '{"msg":"Hello World!"}'
# Create the object
Local Instance OBJ Using OBJECT
# Parse the object
ParseInstance OBJ With SRCJSON
FreeGroup OBJ
Return values
| Value | Explanation |
|---|---|
| 0 | Operation succeeded. |
| -6 | The name of the variable does not exist in the JSON document. |
| -10 | The data provided to be parsed is not a string. |
| -26 | Inconsistent variable provided to assign the JSON parser to. |