Add name-object pair into JSON object
%JSON_ObjectSetObject( INT in handle, TEXT in field, INT in object )
None
Function adds name-object pair into JSON object. If field already exists, value is updated.
Exception is thrown if handle to parent JSON object or added JSON object is invalid or field does not exists.
INT _obj _obj := %JSON_CreateObject() INT _arr _arr := %JSON_CreateArray() %JSON_ArrayAppendValue(_arr, 3.1416) %JSON_ObjectSetArray(_obj, "Constants", _arr) %JSON_FreeObjectHandle(_obj) %JSON_FreeArrayHandle(_arr)
Related pages:
JSON format manipulation functionsFunction arguments - types
0 komentárov