@JsonGetKeys
Syntax
@JsonGetKeys(HJSON);
Description
This @Function returns all keys of a JSON object as a TEXTLIST.
HJSON must contain a valid VSPECHJSON (HJS) handle referencing a JSON object. JSON arrays are not supported by this function.
Each key of the JSON object is added as a separate element to the returned TEXTLIST.
As return value, the @Function returns @ERROR on failure; otherwise, it returns a TEXTLIST containing all keys of the JSON object.
Notes:
If the number of keys exceeds the maximum permitted number of elements in a TEXTLIST, the function returns @ERROR.
The same applies if the total length of the keys exceeds the maximum possible size of a TEXTLIST.
In this case, the following error is returned:
JSON KEYS TEXTLIST TOO LARGE
VSPECHJSON HJSON:
Handle of the JSON object whose keys are to be retrieved.
Example: @JsonGetKeys(HJSON);
HJSON:=@JsonParse("{\"Name\":\"Max Mustermann\",\"Age\":42,\"Active\":true}");
KEYS:=@JsonGetKeys(HJSON);
@JsonRelease(HJSON);
KEYS contains:
"Name" : "Age" : "Active"
Note : This text was machine-translated and may contain inaccuracies.
