The JSONArray class

Provides an interface to handle a JSON array.

The util.JSONArray class provides methods to handle an array of values, following the JSON string syntax.

JSON (JavaScriptâ„¢ Object Notation) is a well known lightweight data-interchange format for JavaScript. For more details, see http://www.json.org. A JSON string (or object) is a comma-separated list of name:value pairs with the ':' character separating the key and the value. The list is enclosed in curly braces ({,}). The names are double-quoted strings.

This class is provided in the util C-Extension library; To use the util.JSONArray class, you must import the util package in your program:
IMPORT util
A JSONArray is an sequence of unnamed values. The format of a JSON array string is a list of values wrapped in square braces with commas between the values:
[123,546,"abc","def","xyz"]

The JSONArray class provides methods for accessing, adding/replacing or deleting the values by index with the get(), put() and remove() methods. If the structure of the JSON array is not known at compile time, you can introspect the elements of the array with the getLength() and getType() methods.

A JSONArray object must be created before usage with one of the class methods like util.JSONArray.create().