Common ¶ Enums ERROR (Enum) Encoding (Enum) JSONType (Enum) Function Blocks FindFirstValueByKey (FunctionBlock) JSONBuilder (FunctionBlock) Reset (Method) SetKey (Method) SetKeyWithArray (Method) SetKeyWithObject (Method) SetKeyWithValue (Method) SetKeyWithValueNull (Method) SetObject (Method) SetValue (Method) JSONByteArrayReader (FunctionBlock) JSONByteArrayWriter (FunctionBlock) JSONData (FunctionBlock) Clear (Method) FindAllElementsByKey (Method) FindFirstElementByKey (Method) FindFirstValueByKey (Method) GetChildren (Method) GetElementByIndex (Method) SetArray (Method) SetBool (Method) SetEmpty (Method) SetKey (Method) SetLReal (Method) SetLRealRounded (Method) SetLint (Method) SetNull (Method) SetObject (Method) SetString (Method) JSONDataFactory (FunctionBlock) Create (Method) JSONFileReader (FunctionBlock) JSONFileWriter (FunctionBlock) Functions JSONElementToString (Function) Interfaces IJSONData (Interface) Clear (Method) FindAllElementsByKey (Method) FindFirstElementByKey (Method) FindFirstValueByKey (Method) GetChildren (Method) GetElementByIndex (Method) SetArray (Method) SetBool (Method) SetKey (Method) SetLReal (Method) SetLRealRounded (Method) SetLint (Method) SetNull (Method) SetObject (Method) SetString (Method) Params GParams (ParamList) Structs JSONElement (Struct) JSONValue (Union)
Enums ¶ ERROR (Enum) Encoding (Enum) JSONType (Enum)
ERROR (ENUM) ¶ TYPE ERROR : JSON Errors InOut: Name Initial Comment NO_ERROR 0 No error INDEX_OUT_OF_BOUNDS 1 Array index was out of bounds NOT_FOUND 2 The requested element can not be found NULL_POINTER 3 Null pointer MAX_STRING_SIZE_EXCEEDED 4 Max size of Strings exceeded. READ_ERROR 5 Read error INVALID_HANDLE 6 Invalid file handle FILE_OPEN_ERROR 7 File open error INVALID_ENCODING 8 Invalid encoding WRITE_ERROR 9 Write error UNKNOWN_JSON_TYPE 10 Unknown json type MAX_FILE_SIZE_EXCEEDED 11 Max size of file exceeded. INVALID_DECIMAL_PLACE 12 Decimal place is < 0 MAX_OBJECT_DEPTH_EXCEEDED 13 Maximum object depth g_diMaxDepth exceeded INVALID_KEY_PARENT 14 Parent of a key must be an object. INVALID_VALUE_PARENT 15 Parent of a value must be an array or a key. INVALID_LICENSE 16 No valid license found or demo mode has expired. INVALID_STRUCTURE 17 Invalid JSON structure NOTSUPPORTED_DATATYPE 18 Datatype is not supported
Encoding (ENUM) ¶ TYPE Encoding : Types of encoding Attributes: qualified_only InOut: Name Initial Comment UTF_8 0 UTF-8 encoding UTF_16 1 UTF-16 encoding
JSONElementToString (FUN) ¶ FUNCTION JSONElementToString : ERROR Converts a JSON element to WSTRING. InOut: Scope Name Type Comment Return JSONElementToString ERROR Input element JSONElement The element to convert Inout wsResult WSTRING(GParams.g_diMaxStringSize) The string representation of an element
Interfaces ¶ IJSONData (Interface) Clear (Method) FindAllElementsByKey (Method) FindFirstElementByKey (Method) FindFirstValueByKey (Method) GetChildren (Method) GetElementByIndex (Method) SetArray (Method) SetBool (Method) SetKey (Method) SetLReal (Method) SetLRealRounded (Method) SetLint (Method) SetNull (Method) SetObject (Method) SetString (Method)
IJSONData (ITF) ¶ INTERFACE IJSONData Interface for JSONData Methods: Clear FindAllElementsByKey FindFirstElementByKey FindFirstValueByKey GetChildren GetElementByIndex SetArray SetBool SetKey SetLReal SetLRealRounded SetLint SetNull SetObject SetString Structure: Clear (Method) FindAllElementsByKey (Method) FindFirstElementByKey (Method) FindFirstValueByKey (Method) GetChildren (Method) GetElementByIndex (Method) SetArray (Method) SetBool (Method) SetKey (Method) SetLReal (Method) SetLRealRounded (Method) SetLint (Method) SetNull (Method) SetObject (Method) SetString (Method)
Params ¶ GParams (ParamList)
GParams (PARAMS) ¶ Parameters and limits Attributes: qualified_only InOut: Scope Name Type Initial Comment Constant g_diMaxElements DINT 4096 Maximum number of JSON elements g_diMaxStringSize DINT 255 Maximum size of STRINGs (in bytes). NOTE: The allocated memory of the JSONData object will be greater than g_diMaxStringSize * g_diMaxElements bytes! Keep this value as small as possible. g_diMaxFileSize DINT 32000 Maximum file size g_diMaxDepth DINT 50 Maximum object depth
Structs ¶ JSONElement (Struct) JSONValue (Union)