%JSON_ObjectGetFieldsCount function


Function

Get fields count in JSON object.

Declaration
INT %JSON_ObjectGetFieldsCount(
    INT in handle
 )
Parameters
handleHandle to JSON object.
Return value

Fields count in JSON object

Description

Function get fields count in JSON object.

Exception is thrown if handle to JSON object is invalid.

Example
 INT _obj
 _obj := %JSON_ObjectFromString('{"1":"A","2":"B"}')
 
 INT _count
 _count := %JSON_ObjectGetFieldsCount(_obj)

 %JSON_FreeObjectHandle(_obj)
Napíšte komentár