Difference between revisions of "ObjectType:jsonarray"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
== Methods == | == Methods == | ||
*'''Clear''': Clears all values from the array | *'''Clear''': Clears all values from the array | ||
− | *'''Set['''#''','''json''']''': Sets a value within the array, to a new JSON value of any type, e.g. <tt> | + | *'''Set['''#''','''json''']''': Sets a value within the array, to a new JSON value of any type, e.g. <tt>myJsonArray:Set[1,"{\"subValue\":12}"]</tt> |
+ | *'''Add['''json''']''': Adds a value to the end of the array, to a new JSON value of any type, e.g. <tt>myJsonArray:Add["{\"subValue\":12}"]</tt> | ||
*'''GetIterator['''jsoniterator''']''': Sets a jsoniterator to iterate this JSON array | *'''GetIterator['''jsoniterator''']''': Sets a jsoniterator to iterate this JSON array | ||
Revision as of 18:20, 30 October 2018
Contents
Overview
jsonarray | |
Defined By | LavishScript |
Inherits | ObjectType:jsonvalue |
Reduces To | same as jsonvalue.AsString |
Variable Object Type | none |
Uses Sub-Types | no |
C/C++ Type | void * |
A jsonarray is a standard JSON array.
Members
- ... Get[#]: Gets a value stored within this object, by its index (1-based)
- ... Get[#,valueName2,...]: Gets a stored value multiple levels deep within jsonarrays and/or jsonobjects
- uint Size: Allocated capacity of the array
- uint Used: Total number of values currently in the array
Methods
- Clear: Clears all values from the array
- Set[#,json]: Sets a value within the array, to a new JSON value of any type, e.g. myJsonArray:Set[1,"{\"subValue\":12}"]
- Add[json]: Adds a value to the end of the array, to a new JSON value of any type, e.g. myJsonArray:Add["{\"subValue\":12}"]
- GetIterator[jsoniterator]: Sets a jsoniterator to iterate this JSON array
See Also
LavishScript Object Types
- Text
- string - mutablestring - unistring
- Numbers
- byte - float - float64 - int - uint - int64
- Boolean (TRUE/FALSE)
- bool
- Pointers
- boolptr - byteptr - floatptr - float64ptr - intptr - uintptr - int64ptr - rgbptr - stringptr
- Containers
- objectcontainer - array - index - collection - queue - stack - set - variablescope
- JSON
- jsonobject - jsonarray - jsonvaluecontainer - jsonvalue
- Iteration
- iterator - jsoniterator
- Date/Time
- time
- File Handling
- filepath - file - filelist - filelistentry
- Tasks
- lavishmachine - Accessed via the Top-Level Object LMAC
- task - tasklibrary - taskmanager - tasktype - taskpulseargs - elmactaskstate