ClassesClassesClassesClasses | | | | Operators

json_at_tuplejson_at_tupleJsonAtTuplejson_at_tupleJsonAtTupleJsonAtTuple (Operator)

Name

json_at_tuplejson_at_tupleJsonAtTuplejson_at_tupleJsonAtTupleJsonAtTuple — Parses a value or an array of values at a given position from a JSON object or JSON array.

Signature

json_at_tuple( : : Json, Key : Value)

Herror json_at_tuple(const char* Json, const char* Key, char* Value)

Herror T_json_at_tuple(const Htuple Json, const Htuple Key, Htuple* Value)

Herror json_at_tuple(const HTuple& Json, const HTuple& Key, char* Value)

Herror json_at_tuple(const HTuple& Json, const HTuple& Key, HTuple* Value)

void JsonAtTuple(const HTuple& Json, const HTuple& Key, HTuple* Value)

void HJsonX.JsonAtTuple(
[in] VARIANT Json, [in] VARIANT Key, [out] VARIANT* Value)

static void HJson.JsonAtTuple(HTuple json, HTuple key, out HTuple value)

Description

json_at_tuplejson_at_tupleJsonAtTuplejson_at_tupleJsonAtTupleJsonAtTuple parses a value or an array of values at a given position from a JSON object or JSON array. The operator can be used as shortcut for the combination of the operators json_atjson_atJsonAtjson_atJsonAtJsonAt and json_get_tuplejson_get_tupleJsonGetTuplejson_get_tupleJsonGetTupleJsonGetTuple.

For JSON objects, the position is passed as a string (key) in KeyKeyKeyKeyKeykey.

For JSON arrays, the position is passed as an integer (index) in KeyKeyKeyKeyKeykey.

If the JSON representation at the position KeyKeyKeyKeyKeykey is a JSON object, the error 13003 (json_err_type_error) will be returned. In this case a combination of json_atjson_atJsonAtjson_atJsonAtJsonAt, json_object_keysjson_object_keysJsonObjectKeysjson_object_keysJsonObjectKeysJsonObjectKeys, and json_at_tuplejson_at_tupleJsonAtTuplejson_at_tupleJsonAtTupleJsonAtTuple should be used to iterate over the JSON object.

If the JSON representation at the position KeyKeyKeyKeyKeykey is 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, the error 13003 (json_err_type_error) will be returned. In this case a combination of json_atjson_atJsonAtjson_atJsonAtJsonAt, json_array_sizejson_array_sizeJsonArraySizejson_array_sizeJsonArraySizeJsonArraySize, and json_at_tuplejson_at_tupleJsonAtTuplejson_at_tupleJsonAtTupleJsonAtTuple should be used to iterate over the JSON array.

Find more information about the JSON extension package in the introduction to this chapter.

Parallelization

Parameters

JsonJsonJsonJsonJsonjson (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

JSON string

KeyKeyKeyKeyKeykey (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

key or zero-based index

ValueValueValueValueValuevalue (output_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

value

See also

json_atjson_atJsonAtjson_atJsonAtJsonAt

Module

Foundation


ClassesClassesClassesClasses | | | | Operators