%JSON_ArrayAppendValue function


Funkcia

Append value to JSON array

Deklarácia
%JSON_ArrayAppendValue(
   INT in handle
   UNIVAL in value
 )
Parametre
handleHandle to JSON array
valueValue to be appended
Návratová hodnota

None

Popis

Function append value to JSON array. Supported types are INT, REAL, BOOL and TEXT. If you want to append TIME type, you have to first convert it to TEXT type.

Exception is thrown if you try to append unsupported type, or if provided invalid handle to JSON array.


Príklad
 INT _arr
 _arr := %JSON_CreateArray()

 %JSON_ArrayAppendValue(_arr, "IPESOFT")
 %JSON_ArrayAppendValue(_arr, 365)
 %JSON_ArrayAppendValue(_arr, 1.234)
 %JSON_ArrayAppendValue(_arr, @TRUE)
 %JSON_ArrayAppendValue(_arr, U.uservariable)

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