API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IJSONTREE_ARRAYSET()

Brew Release
Brew MP 1.0.2
Description
Given an array and index, this function sets the given JSValue.
For an existing index, the old value is deleted (its memory freed) and replaced with the given JSValue.
If the index is past the end of the existing array, the array is extended to be large enough to contain the index passed in. All values between the end of the orginal array and the supplied index are filled with JSONNull values.
If index is out of range, then the array is extended with JSONNull values until the supplied index and then is set with the given JSValue.
Params
me
[]:
pointer to the IJSONTree Interface object
pjvArray
[]:
JSValue array
nPos
[]:
zero based array index at which pjv will be set
pjv
[]:
JSValue to set at the given index
Interface
Prototype
  •    int IJSONTree_ArraySet(IJSONTree *me, JSValue *pjvArray, int nPos, JSValue* pjv);
     
Return
  • AEE_SUCCESS: on success IJSONTree_EBADTYPE: if pjvArray is not an array AEE_ENOMEMORY: if out of memory IJSONTree_EOUTOFRANGE: if nPos in out of range