Operators |
json_get_tuple — Parses a value or an array of values from a JSON string.
json_get_tuple parses a value or an array of values from a JSON string.
Directly supported data types are:
Integers will be returned as integers (LONG_PAR / H_TYPE_INT) in the HALCON tuple.
Floating point numbers will be returned as Real numbers (DOUBLE_PAR / H_TYPE_REAL) in the HALCON tuple.
Strings will be returned as strings (STRING_PAR / H_TYPE_STRING) in the HALCON tuple.
Boolean values will be returned as integers (LONG_PAR / H_TYPE_INT) in the HALCON tuple. true will be mapped to 1, false will be mapped to 0.
Null will be returned as integer (LONG_PAR / H_TYPE_INT) with value 0 in the HALCON tuple.
If the string in Json represents a JSON object, an error will be returned. In this case a combination of json_object_keys and json_at should be used to iterate over the JSON object.
If the string in Json represents a JSON array, a multi-value tuple will be returned. In an entry of the array is structured, i.e. the entry represents a JSON array or JSON object, an error will be returned. In this case a combination of json_array_size and json_at should be used to iterate over the JSON array.
Find more information about the JSON extension package in the introduction to this chapter.
JSON string
value(s)
Foundation
Operators |