%JSON_CreateObject function


Function

Create new empty JSON object

Declaration
INT %JSON_CreateObject()
Parameters

None

Return value

Handler to JSON object, must be released by %JSON_FreeObjectHandle

Description

Function create new empty JSON object.

Example
 INT _obj
 _obj := %JSON_CreateObject()
 
 BOOL _ret
 _ret := %JSON_ObjectSetValue(_obj, "Name", "John")
 _ret := %JSON_ObjectSetValue(_obj, "Surname", "Smith")
 
 TEXT _txt
 _txt := %JSON_ObjectToString(_obj, @FALSE)

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