JSONArray Class

A JSONArray is an ordered sequence of values. Its external text form is a string wrapped in square brackets with commas separating the values.

Constructors

public JSONArray( )
public JSONArray( String source )
protected JSONArray( javaxt.json.JSONTokener x )

Methods

add( Object object ) returns void
Appends an object to the array.
equals( Object obj ) returns boolean
Returns true if the given object is a JSONArray and the JSONArray contains the same entries as this array. Order is important.
get( int index ) returns javaxt.json.JSONValue
Returns the object value associated with an index.
isEmpty( ) returns boolean
Returns true if there are no entries in the array.
iterator( ) returns java.util.Iterator
length( ) returns int
Returns the number of elements in the JSONArray, included nulls.
remove( int index ) returns Object
Remove entry. Returns the value that was associated with the index, or null if there was no value.
toString( ) returns String
Returns a printable, displayable, transmittable representation of the array. For compactness, no unnecessary whitespace is added. If it is not possible to produce a syntactically correct JSON text then null will be returned instead.
toString( int indentFactor ) returns String
Returns a printable, displayable, transmittable representation of the array.