Calling convention: CIP_JSON_GetValue(JSONObjectPointer: NativeInt, "TokenPath": String, "ValueType": String): Variant
Description: Reads a JSON value at TokenPath and converts it to the requested MathParser type.
Parameters:
JSONObjectPointer = Valid pointer to a managed JSON value.
TokenPath = Path of the requested value.
ValueType = STRING, INTEGER, NUMBER, DOUBLE, ARRAY or OBJECT.
Returns: Variant: converted scalar value, or a borrowed NativeInt pointer for ARRAY and OBJECT. A missing ARRAY or OBJECT path returns NULL; scalar lookup or conversion errors may raise an exception.
Availability: Default.
Example:
try
JSONObj := CIP_JSON_LoadObjectFromFile("c:\temp\climate.json");
WorkStr := CIP_JSON_GetValue(JSONObj, "[0].city", "STRING");
CIP_AddScreenLog(WorkStr);
finally
CIP_JSON_FreeObject(JSONObj);
end;