Functions¶
create and release¶
JSON_New¶
-
group
JSONXOP_New
register a new object
- Return
a numeric identifier of the JSON object on success
- Parameters
ignoreErr
: [optional, default 0] set to ignore runtime errors
Functions
-
variable
JSON_New
(variable ignoreErr = defaultValue)¶
JSON_Release¶
-
group
JSONXOP_Release
Release a JSON id from memory.
- Return
0 on success, NaN otherwise
- Parameters
jsonID
: numeric identifier of the main objectignoreErr
: [optional, default 0] set to ignore runtime errors
Functions
-
variable
JSON_Release
(variable jsonID, variable ignoreErr = defaultValue)¶
parse and dump¶
JSON_Parse¶
-
group
JSONXOP_Parse
Parse a JSON string with the XOP.
- Return
a numeric identifier of the JSON object on success
- Parameters
jsonStr
: string representation of the JSON objectignoreErr
: [optional, default 0] set to ignore runtime errors
Functions
-
variable
JSON_Parse
(string jsonStr, variable ignoreErr = defaultValue)¶
JSON_Dump¶
-
group
JSONXOP_Dump
Functions
-
string
JSON_Dump
(variable jsonID, variable indent = defaultValue, variable ignoreErr = defaultValue)¶ Dump a JSON id to its string representation.
- Return
a string representation of the JSON object
- Parameters
jsonID
: numeric identifier of the main objectindent
: [optional, default 0] number of white spaces for pretty output indentation.ignoreErr
: [optional, default 0] set to ignore runtime errors
-
string
structured types¶
JSON_AddTree¶
-
group
JSONXOP_AddTree
Functions
-
variable
JSON_AddTreeObject
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Recursively add new objects to the tree.
Non-existing path elements are recursively created.
- See
- Return
0 on success
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddTreeArray
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Recursively add a new array to the tree.
Non-existing path elements are created as objects.
- See
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable static
JSON_AddTree
(variable jsonID, string jsonPath, variable type, variable ignoreErr)¶
-
variable
JSON_AddValue¶
-
group
JSONXOP_AddValue
Functions
-
variable
JSON_AddString
(variable jsonID, string jsonPath, string value, variable ignoreErr = defaultValue)¶ Add a string entity to a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: string value to addignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddVariable
(variable jsonID, string jsonPath, variable value, variable significance = defaultValue, variable ignoreErr = defaultValue)¶ Add a numeric entity to a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: numeric value to addsignificance
: [optional] number of digits after the decimal signignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddNull
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Add a
null
entity to a JSON object.- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddBoolean
(variable jsonID, string jsonPath, variable value, variable ignoreErr = defaultValue)¶ Add a numeric value as boolean to a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: boolean value to addignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddWave
(variable jsonID, string jsonPath, wave wv, variable ignoreErr = defaultValue)¶ Add a WAVE as array entity to a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointerwv
: WAVE reference to the wave to addignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddInt64
(variable jsonID, string jsonPath, int64 value, variable ignoreErr = defaultValue)¶ Add a 64bit integer to a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: int64 value to addignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddUInt64
(variable jsonID, string jsonPath, uint64 value, variable ignoreErr = defaultValue)¶ Add an unsigned 64bit integer to a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: uint64 value to addignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable static
AddValueI64
(variable jsonID, string jsonPath, wave w, variable ignoreErr)¶
-
variable
JSON_AddObjects
(variable jsonID, string jsonPath, variable objCount = defaultValue, variable ignoreErr = defaultValue)¶ Add a specified number of objects to a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerobjCount
: [optional, default 1] number of objectsignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_AddJSON
(variable jsonID, string jsonPath, variable jsonID2, variable ignoreErr = defaultValue)¶ Merge a JSON object to another object.
- Parameters
jsonID
: numeric identifier of the main objectjsonPath
: RFC 6901 compliant JSON PointerjsonID2
: numeric identifier of the merged objectignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetString
(variable jsonID, string jsonPath, string value, variable ignoreErr = defaultValue)¶ Replace with a string entity at the given location in a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: new string valueignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetVariable
(variable jsonID, string jsonPath, variable value, variable significance = defaultValue, variable ignoreErr = defaultValue)¶ Replace with a numeric entity at the given location in a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: new numeric valuesignificance
: [optional] number of digits after the decimal signignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetNull
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Replace with a
null
entity at the given location in a JSON object.- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetBoolean
(variable jsonID, string jsonPath, variable value, variable ignoreErr = defaultValue)¶ Replace with a boolean value at the given location in a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: new boolean valueignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetWave
(variable jsonID, string jsonPath, wave wv, variable ignoreErr = defaultValue)¶ Replace with a WAVE as array entity at the given location in a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointerwv
: WAVE reference to the new waveignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetInt64
(variable jsonID, string jsonPath, int64 value, variable ignoreErr = defaultValue)¶ Replace with a 64bit integer at the given location in a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: new int64 valueignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetUInt64
(variable jsonID, string jsonPath, uint64 value, variable ignoreErr = defaultValue)¶ Replace with an unsigned 64bit integer at the given location in a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON Pointervalue
: new uint64 valueignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable static
SetValueI64
(variable jsonID, string jsonPath, wave w, variable ignoreErr)¶
-
variable
JSON_SetObjects
(variable jsonID, string jsonPath, variable objCount = defaultValue, variable ignoreErr = defaultValue)¶ Replace with a specified number of objects at the giveln location in a JSON object.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerobjCount
: [optional, default 1] number of objectsignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_SetJSON
(variable jsonID, string jsonPath, variable jsonID2, variable ignoreErr = defaultValue)¶ Replace an entity with the given JSON object at the specified location in the main object.
- Parameters
jsonID
: numeric identifier of the main objectjsonPath
: RFC 6901 compliant JSON PointerjsonID2
: numeric identifier of the merged objectignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_GetValue¶
-
group
JSONXOP_GetValue
Functions
-
string
JSON_GetString
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Get a text entity as string variable from a JSON object.
- Return
a string containing the entity
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
JSON_GetVariable
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Get a numeric, boolean or null entity as variable from a JSON object.
- Return
a numeric variable containing the entity
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
wave
JSON_GetTextWave
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Get an array as text wave from a JSON object.
- Return
a free text wave with the elements of the array
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
wave
JSON_GetWave
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶ Get an array as numeric wave from a JSON object.
- Return
a free numeric double precision wave with the elements of the array
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
std::tuple<Int64>
JSON_GetInt64
(Variable jsonID, String jsonPath, Variable ignoreErr = defaultValue)¶ Get a 64bit integer from a JSON object.
- Return
a 64bit variable
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
std::tuple<UInt64>
JSON_GetUInt64
(Variable jsonID, String jsonPath, Variable ignoreErr = defaultValue)¶ Get an unsigned 64bit integer from a JSON object.
- Return
an unsigned 64bit variable
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
-
string
JSON_GetType¶
-
group
JSONXOP_GetType
get the JSON Type for an element at the given path.
- Return
a numeric value representing one of the defined
- See
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
Functions
-
variable
JSON_GetType
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶
JSON_GetKeys¶
-
group
JSONXOP_GetKeys
Get the name of all object members of the specified path.
- Return
a free text wave with all elements as rows.
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errorsesc
: [optional, 0 or 1] set to ignore RFC 6901 path escaping standards
Functions
-
wave
JSON_GetKeys
(variable jsonID, string jsonPath, variable esc = defaultValue, variable ignoreErr = defaultValue)¶
JSON_Exists¶
-
group
JSONXOP_Exists
Functions
-
variable
JSON_Exists
(variable jsonID, string jsonPath)¶ Check if the jsonID/jsonPath is valid.
- Return
1 if object at jsonPath exists in JSON object, 0 otherwise
- Parameters
jsonID
: numeric identifier of the main objectjsonPath
: RFC 6901 compliant JSON Pointer
-
variable
JSON_Remove¶
-
group
JSONXOP_Remove
Remove a path element from a JSON string representation.
- Return
0 on success, NaN otherwise
- Parameters
jsonID
: numeric identifier of the main objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
Functions
-
variable
JSON_Remove
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶
arrays¶
JSON_GetArraySize¶
-
group
JSONXOP_GetArraySize
Get the number of elements in an array.
- Return
a numeric variable with the number of elements the array at jsonPath
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
Functions
-
variable
JSON_GetArraySize
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶
JSON_GetMaxArraySize¶
-
group
JSONXOP_GetMaxArraySize
Get the maximum element size for each dimension in an array.
- Return
a free numeric wave with the size for each dimension as rows
- Parameters
jsonID
: numeric identifier of the JSON objectjsonPath
: RFC 6901 compliant JSON PointerignoreErr
: [optional, default 0] set to ignore runtime errors
Functions
-
wave
JSON_GetMaxArraySize
(variable jsonID, string jsonPath, variable ignoreErr = defaultValue)¶
version information¶
JSON_Version¶
-
group
JSONXOP_Version
Functions
-
string
JSON_Version
(variable ignoreErr = defaultValue)¶ Output version information useful for issue reports.
- Parameters
ignoreErr
: [optional, default 0] set to ignore runtime errors
-
string
JSON_GetIgorInfo¶
-
group
JSON_GetIgorInfo
Functions
-
variable
JSON_GetIgorInfo
(variable ignoreErr = defaultValue)¶ Return JSON with Igor information.
- Parameters
ignoreErr
: [optional, default 0] set to ignore runtime errors
-
variable
Options¶
JSON_Options¶
-
group
JSONXOP_Options
Functions
-
variable
JSON_DisableQuietMode
()¶ Disables quiet mode.
-
variable
JSON_EnableQuietMode
()¶ Enables quiet mode.
-
variable
JSON_SetIgnoreErrors
()¶ Sets the ignore errors define for the json wrapper functions.
-
variable
JSON_UnsetIgnoreErrors
()¶ Undefines the ignore errors define for the json wrapper functions.
-
variable