JSONArray Class

A JSON array is simply an array of objects. The string representation of a JSON array is a widely-used standard format for exchanging data. The string begins with a left square bracket "[" and ends with a right square bracket "]". Each object in the array is separated by comma ",".

Constructors

JSONArray( )
JSONArray( String source )

Public Methods

iterator( ) returns java.util.Iterator<JSONValue>
length( ) returns int
Returns the number of elements in the JSONArray, included nulls.
isEmpty( ) returns boolean
Returns true if there are no entries in the array.
get( int index ) returns JSONValue
Returns the object value associated with an index.
add( Object object ) returns void
Appends an object to the array.
set( int index, Object object ) returns JSONValue
Updates an object to the array. Returns the original value that was associated with the index.
remove( int index ) returns JSONValue
Remove entry. Returns the value that was associated with the index.
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.
toArray( ) returns Object[]
Returns an array of Objects backing the JSONArray
toString( ) returns String
toString( int indentFactor ) returns String
Returns a printable, displayable, transmittable representation of the array.