util.JSONArray class

util.JSONArray class is used to modify and manipulate ordered lists of values according to the syntax of JSON string.

JSON array is an ordered list of value pairs:

[234,3456,24656,34561]

[a, ab, abc, aa, aabb, aabbcc]

JSON arrays are enclosed in square brackets - [ to begin the array and ] to end it. Values are separated by , (comma):

JSON arrays are created by util.JSONArray.create().

Once created, JSON arrays can be studied and manipulated by util.JSONObject methods summarized in this table.

util.JSONArray.create()

creates a new JSON array

util.JSONArray.clear()

removes JSON array elements and sets JSON array length to 0

util.JSONArray.delete()

deletes the specified member from the JSON array, or a range of members if two indexes are specified as parameters. These indexes denote the range to delete.

util.JSONArray.fromFGL()

creates a new JSON array from a DYNAMIC ARRAY

util.JSONArray.get()

returns a value of a member of the JSON array

util.JSONArray.getLength()

returns the number of the members included in the JSON array

util.JSONArray.getSize()

returns a length of the JSON array

util.JSONArray.getType()

returns the type of the member of the JSON array

util.JSONArray.insert()

removes the specified element from the JSON array

util.JSONArray.parse()

parses a JSON string into a new JSON array

util.JSONArray.put()

adds a new member to the specified JSON array

util.JSONArray.remove()

takes the index of the element of JSON array (a key-value pair) as the parameter, and deletes this element

util.JSONArray.toFGL()

fills a DYNAMIC ARRAY with the elements of the JSON array

util.JSONArray.toString()

produces a JSON string from the values included in the JSON array

 

Contact Us

Privacy Policy

Copyright © 2025 Querix, (UK) Ltd.