Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%JSON_ArraySetArray function


Function

Replace item at given index in JSON array by Inserts a new array at the specified index into the JSON array.

Declaration


Blok kódu
languageesl
themeConfluence
%JSON_ArraySetArray(
    INT in handle, 
    INT in index,
    INT in array
 )


Parameters


handleHandle to parent JSON array.
indexIndex
arrayHandle to JSON array.


Return value

None

Description

The function inserts a new array at the specified index into the JSON array.

If it is an invalid handle on a JSON array or an invalid handle on an inserted JSON array or is an invalid index, an exception is thrown

Function replace item at given index in JSON array by array.

Exception is thrown if handle to parent JSON array is invalid, handle to array is invalid or index is out of range.

Example


Blok kódu
languageesl
themeRDark
 INT _arr
 _arr := %JSON_CreateArray()

 INT _tmp
 _tmp := %JSON_CreateArray()
 
 %JSON_ArraySetLength(_arr, 1)
 %JSON_ArraySetArray(_arr, 1, _tmp)

 %JSON_FreeArrayHandle(_arr)
 %JSON_FreeArrayHandle(_tmp)