%JSON_ArrayIsObject function


Function

Determines if there is an object at a given position in the JSON array.

Declaration
BOOL %JSON_ArrayIsObject(
    INT in handle, 
    INT in index
 )
Parameters
handleHandle to the parent JSON array.
indexIndex.
Return value

@TRUE if there is a JSON object at that position, @FALSE otherwise.

Description

The function determines whether there is an object at a given position in the JSON array.

If the index is invalid or the handle on the JSON array is invalid, an exception is thrown.

Example
 INT _arr
 _arr := %JSON_ArrayFromString("[[1,2,3],{}]")
 
 BOOL _is_array
 _is_array := %JSON_ArrayIsArray(_arr, 1)

 %JSON_FreeArrayHandle(_arr)
Napíšte komentár