%JSON_ObjectGetObject function


Function

Gets an object in the field from the JSON object.

Declaration
INT %JSON_ObjectGetObject(
    INT in handle, 
    TEXT in field
 )
Parameters
handleHandle to parent JSON object.
fieldField name
Return value
Handle to the JSON object, must be released by %JSON_FreeObjectHandle.


Description

Funciton gets an array in the field from the JSON object.

Exception is thrown if object at index is not array, handle to JSON object is invalid or the field does not exists.

Example
 INT _obj
 _obj := %JSON_ObjectFromString(ModuleInfo)
 
 INT _tmp
 _tmp := %JSON_ObjectGetObject(_obj, "client_info")

 %JSON_FreeObjectHandle(_obj)
 %JSON_FreeObjectHandle(_tmp)

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .