Calling convention: CIP_JSON_LoadObjectFromFile("JSONFilePath": String): NativeInt
Description: Reads a JSON file, parses its content and stores the resulting root value in the runtime JSON-object container. Relative paths are resolved from the application executable directory.
Parameters:
JSONFilePath = Path of the JSON file to load.
Returns: NativeInt: managed pointer to the parsed JSON value; NULL if parsing returns no value. A NULL path or file-reading error raises 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;