util.JSONArray methods

Methods for the util.JSONArray class.

Table 1. Class methods
Name Description
util.JSONArray.create()
  RETURNING array util.JSONArray
Creates a new JSON array object.
util.JSONArray.fromFGL(
   source DYNAMIC ARRAY )
  RETURNING array util.JSONArray
Creates a new JSON array object from a DYNAMIC ARRAY.
util.JSONArray.parse(
   source STRING )
  RETURNING result util.JSONArray
Parses a JSON string and creates a JSON array object from it.
Table 2. Object methods
Name Description
util.JSONArray.get(
   index INTEGER )
  RETURNING result result-type
Returns the value of a JSON array element.
util.JSONArray.getType(
   index INTEGER )
  RETURNING type STRING
Returns the type of a JSON array element.
util.JSONArray.getLength()
  RETURNING length INTEGER
Returns the number of elements in the JSON array object.
util.JSONArray.put(
   index INTEGER,
   value value-type )
Sets an element by position in the JSON array object.
util.JSONArray.remove(
   index INTEGER )
Removes the specified entry in the JSON array object.
util.JSONArray.toFGL(
   dest DYNAMIC ARRAY )
Fills a dynamic array variable with the elements contained in the JSON array object.
util.JSONArray.toString()
  RETURNING result STRING
Builds a JSON string from the elements contained in the JSON array object.