Example usage for Java org.json JSONArray fields, constructors, methods, implement or subclass
The text is from its open source code.
JSONArray(JSONTokener x) Construct a JSONArray from a JSONTokener. | |
JSONArray(String source) Construct a JSONArray from a source JSON text. | |
JSONArray(Collection collection) Construct a JSONArray from a Collection. | |
JSONArray(Object array) Construct a JSONArray from an array | |
JSONArray() Construct an empty JSONArray. |
boolean | equals(Object obj) Indicates whether some other object is "equal to" this one. |
Object | get(int index) Get the object value associated with an index. |
boolean | getBoolean(int index) Get the boolean value associated with an index. |
Class> | getClass() Returns the runtime class of this Object . |
double | getDouble(int index) Get the double value associated with an index. |
int | getInt(int index) Get the int value associated with an index. |
JSONArray | getJSONArray(int index) Get the JSONArray associated with an index. |
JSONObject | getJSONObject(int index) Get the JSONObject associated with an index. |
long | getLong(int index) Get the long value associated with an index. |
String | getString(int index) Get the string associated with an index. |
boolean | isNull(int index) Determine if the value is null. |
String | join(String separator) Make a string from the contents of this JSONArray. |
int | length() Get the number of elements in the JSONArray, included nulls. |
Object | opt(int index) Get the optional object value associated with an index. |
boolean | optBoolean(int index) Get the optional boolean value associated with an index. |
double | optDouble(int index, double defaultValue) Get the optional double value associated with an index. |
int | optInt(int index) Get the optional int value associated with an index. |
int | optInt(int index, int defaultValue) Get the optional int value associated with an index. |
JSONArray | optJSONArray(int index) Get the optional JSONArray associated with an index. |
JSONObject | optJSONObject(int index) Get the optional JSONObject associated with an index. |
long | optLong(int index) Get the optional long value associated with an index. |
long | optLong(int index, long defaultValue) Get the optional long value associated with an index. |
String | optString(int index) Get the optional string value associated with an index. |
String | optString(int index, String defaultValue) Get the optional string associated with an index. |
JSONArray | put(boolean value) Append a boolean value. |
JSONArray | put(Collection value) Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection. |
JSONArray | put(double value) Append a double value. |
JSONArray | put(int value) Append an int value. |
JSONArray | put(long value) Append an long value. |
JSONArray | put(Map value) Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map. |
JSONArray | put(Object value) Append an object value. |
JSONArray | put(int index, boolean value) Put or replace a boolean value in the JSONArray. |
JSONArray | put(int index, Collection value) Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection. |
JSONArray | put(int index, double value) Put or replace a double value. |
JSONArray | put(int index, int value) Put or replace an int value. |
JSONArray | put(int index, long value) Put or replace a long value. |
JSONArray | put(int index, Map value) Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map. |
JSONArray | put(int index, Object value) Put or replace an object value in the JSONArray. |
JSONObject | toJSONObject(JSONArray names) Produce a JSONObject by combining a JSONArray of names with the values of this JSONArray. |
String | toString() Make a JSON text of this JSONArray. |
String | toString(int indentFactor) Make a prettyprinted JSON text of this JSONArray. |
Writer | write(Writer writer) Write the contents of the JSONArray as JSON text to a writer. |