JSONArray
JSONArray
append(boolean value)
Append a boolean value.
JSONArray
append(double value)
Append a double value.
JSONArray
append(float value)
Append a float value.
JSONArray
append(int value)
Append an int value.
JSONArray
append(JSONArray value)
JSONArray
append(JSONObject value)
JSONArray
append(long value)
Append an long value.
JSONArray
append(java.lang.String value)
Append an String value.
java.lang.String
format(int indentFactor)
Make a pretty-printed JSON text of this JSONArray.
java.lang.Object
get(int index)
Get the object value associated with an index.
boolean
getBoolean(int index)
Get the boolean value associated with an index.
boolean
getBoolean(int index,
boolean defaultValue)
Get the optional boolean value associated with an index.
boolean[]
getBooleanArray()
Get this entire array as a boolean array.
double
getDouble(int index)
Get the double value associated with an index.
double
getDouble(int index,
double defaultValue)
Get the optional double value associated with an index.
double[]
getDoubleArray()
Get this entire array as a double array.
float
getFloat(int index)
Get a value from an index as a float.
float
getFloat(int index,
float defaultValue)
float[]
getFloatArray()
Get this entire array as a float array.
int
getInt(int index)
Get the int value associated with an index.
int
getInt(int index,
int defaultValue)
Get the optional int value associated with an index.
int[]
getIntArray()
Get this entire array as an int array.
JSONArray
getJSONArray(int index)
Get the JSONArray associated with an index.
JSONArray
getJSONArray(int index,
JSONArray defaultValue)
JSONObject
getJSONObject(int index)
Get the JSONObject associated with an index.
JSONObject
getJSONObject(int index,
JSONObject defaultValue)
long
getLong(int index)
Get the long value associated with an index.
long
getLong(int index,
long defaultValue)
Get the optional long value associated with an index.
long[]
getLongArray()
Get this entire array as a long array.
java.lang.String
getString(int index)
Get the string associated with an index.
java.lang.String
getString(int index,
java.lang.String defaultValue)
Get the optional string associated with an index.
java.lang.String[]
getStringArray()
Get this entire array as a String array.
boolean
isNull(int index)
Determine if the value is null.
java.lang.String
join(java.lang.String separator)
Make a string from the contents of this JSONArray.
static JSONArray
parse(java.lang.String source)
Construct a JSONArray from a source JSON text.
java.lang.Object
remove(int index)
Remove an index and close the hole.
boolean
save(java.io.File file,
java.lang.String options)
JSONArray
setBoolean(int index,
boolean value)
Put or replace a boolean value in the JSONArray.
JSONArray
setDouble(int index,
double value)
Put or replace a double value.
JSONArray
setFloat(int index,
float value)
Put or replace a float value.
JSONArray
setInt(int index,
int value)
Put or replace an int value.
JSONArray
setJSONArray(int index,
JSONArray value)
JSONArray
setJSONObject(int index,
JSONObject value)
JSONArray
setLong(int index,
long value)
Put or replace a long value.
JSONArray
setString(int index,
java.lang.String value)
Put or replace a String value.
int
size()
Get the number of elements in the JSONArray, included nulls.
java.lang.String
toString()
Return the JSON data formatted with two spaces for indents.
boolean
write(java.io.PrintWriter output)
boolean
write(java.io.PrintWriter output,
java.lang.String options)