Porovnávané verzie

Kľúč

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

%JSON_ArraySetObject function


Function

Replace Replaces an item at a given index in the JSON array by object.

Declaration


Blok kódu
languageesl
themeConfluence
%JSON_ArraySetObject(
    INT in handle, 
    INT in index,
    INT in object
 )


Parameters


handleHandle to parent JSON array.
indexIndex
objectHandle to JSON object.


Return value

None

Description

Function replace replaces an item at a given index in the JSON array by object.

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

Example


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

 INT _tmp
 _tmp := %JSON_CreateObject()
 
 %JSON_ArraySetLength(_arr, 1)
 %JSON_ArraySetObject(_arr, 1, _tmp)

 %JSON_FreeArrayHandle(_arr)
 %JSON_FreeObjectHandle(_tmp)