Index
All Classes and Interfaces|All Packages|Serialized Form
A
- accumulate(String, Object) - Method in class org.json.JSONObject
-
Appends
value
to the array already mapped toname
. - array() - Method in class org.json.JSONStringer
-
Begins encoding a new array.
B
- back() - Method in class org.json.JSONTokener
-
Unreads the most recent character of input.
D
- dehexchar(char) - Static method in class org.json.JSONTokener
-
Returns the integer [0..15] value for the given hex character, or -1 for non-hex input.
E
- endArray() - Method in class org.json.JSONStringer
-
Ends encoding the current array.
- endObject() - Method in class org.json.JSONStringer
-
Ends encoding the current object.
- equals(Object) - Method in class org.json.JSONArray
G
- get(int) - Method in class org.json.JSONArray
-
Returns the value at
index
. - get(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
. - getBoolean(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a boolean or can be coerced to a boolean. - getBoolean(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a boolean or can be coerced to a boolean. - getDouble(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a double or can be coerced to a double. - getDouble(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a double or can be coerced to a double. - getInt(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is an int or can be coerced to an int. - getInt(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is an int or can be coerced to an int. - getJSONArray(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is aJSONArray
. - getJSONArray(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is aJSONArray
. - getJSONObject(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is aJSONObject
. - getJSONObject(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is aJSONObject
. - getLong(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a long or can be coerced to a long. - getLong(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a long or can be coerced to a long. - getString(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists, coercing it if necessary. - getString(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists, coercing it if necessary.
H
- has(String) - Method in class org.json.JSONObject
-
Returns true if this object has a mapping for
name
. - hashCode() - Method in class org.json.JSONArray
I
- isNull(int) - Method in class org.json.JSONArray
-
Returns true if this array has no value at
index
, or if its value is thenull
reference orJSONObject.NULL
. - isNull(String) - Method in class org.json.JSONObject
-
Returns true if this object has no mapping for
name
or if it has a mapping whose value isJSONObject.NULL
. - iterator() - Method in class org.json.JSONArray
J
- join(String) - Method in class org.json.JSONArray
-
Returns a new string by alternating this array's values with
separator
. - JSONArray - Class in org.json
-
A dense indexed sequence of values.
- JSONArray() - Constructor for class org.json.JSONArray
-
Creates a
JSONArray
with no values. - JSONArray(String) - Constructor for class org.json.JSONArray
-
Creates a new
JSONArray
with values from the JSON string. - JSONArray(Collection) - Constructor for class org.json.JSONArray
-
Creates a new
JSONArray
by copying all values from the given collection. - JSONArray(JSONTokener) - Constructor for class org.json.JSONArray
-
Creates a new
JSONArray
with values from the next array in the tokener. - JSONException - Exception Class in org.json
-
Thrown to indicate a problem with the JSON API.
- JSONException(String) - Constructor for exception class org.json.JSONException
- JSONObject - Class in org.json
-
A modifiable set of name/value mappings.
- JSONObject() - Constructor for class org.json.JSONObject
-
Creates a
JSONObject
with no name/value mappings. - JSONObject(String) - Constructor for class org.json.JSONObject
-
Creates a new
JSONObject
with name/value mappings from the JSON string. - JSONObject(Map) - Constructor for class org.json.JSONObject
-
Creates a new
JSONObject
by copying all name/value mappings from the given map. - JSONObject(JSONObject, String[]) - Constructor for class org.json.JSONObject
-
Creates a new
JSONObject
by copying mappings for the listed names from the given object. - JSONObject(JSONTokener) - Constructor for class org.json.JSONObject
-
Creates a new
JSONObject
with name/value mappings from the next object in the tokener. - JSONStringer - Class in org.json
-
Implements
JSONObject.toString()
andJSONArray.toString()
. - JSONStringer() - Constructor for class org.json.JSONStringer
- JSONTokener - Class in org.json
-
Parses a JSON (RFC 4627) encoded string into the corresponding object.
- JSONTokener(InputStream) - Constructor for class org.json.JSONTokener
- JSONTokener(String) - Constructor for class org.json.JSONTokener
K
- key(String) - Method in class org.json.JSONStringer
-
Encodes the key (property name) to this stringer.
- keys() - Method in class org.json.JSONObject
-
Returns an iterator of the
String
names in this object.
L
- length() - Method in class org.json.JSONArray
-
Returns the number of values in this array.
- length() - Method in class org.json.JSONObject
-
Returns the number of name/value mappings in this object.
M
- more() - Method in class org.json.JSONTokener
-
Returns true until the input has been exhausted.
N
- names() - Method in class org.json.JSONObject
-
Returns an array containing the string names in this object.
- next() - Method in class org.json.JSONTokener
-
Returns the next available character, or the null character '\0' if all input has been exhausted.
- next(char) - Method in class org.json.JSONTokener
-
Returns the next available character if it equals
c
. - next(int) - Method in class org.json.JSONTokener
-
Returns the next
length
characters of the input. - nextClean() - Method in class org.json.JSONTokener
-
Returns the next character that is not whitespace and does not belong to a comment.
- nextString(char) - Method in class org.json.JSONTokener
-
Returns the string up to but not including
quote
, unescaping any character escape sequences encountered along the way. - nextTo(char) - Method in class org.json.JSONTokener
-
Equivalent to
nextTo(String.valueOf(excluded))
. - nextTo(String) - Method in class org.json.JSONTokener
-
Returns the
trimmed
string holding the characters up to but not including the first of: any character inexcluded
a newline character '\n' a carriage return '\r' - nextValue() - Method in class org.json.JSONTokener
-
Returns the next value from the input.
- NULL - Static variable in class org.json.JSONObject
-
A sentinel value used to explicitly define a name with no value.
- numberToString(Number) - Static method in class org.json.JSONObject
-
Encodes the number as a JSON string.
O
- object() - Method in class org.json.JSONStringer
-
Begins encoding a new object.
- opt(int) - Method in class org.json.JSONArray
-
Returns the value at
index
, or null if the array has no value atindex
. - opt(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
, or null if no such mapping exists. - optBoolean(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a boolean or can be coerced to a boolean. - optBoolean(int, boolean) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a boolean or can be coerced to a boolean. - optBoolean(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a boolean or can be coerced to a boolean. - optBoolean(String, boolean) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a boolean or can be coerced to a boolean. - optDouble(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a double or can be coerced to a double. - optDouble(int, double) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a double or can be coerced to a double. - optDouble(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a double or can be coerced to a double. - optDouble(String, double) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a double or can be coerced to a double. - optInt(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is an int or can be coerced to an int. - optInt(int, int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is an int or can be coerced to an int. - optInt(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is an int or can be coerced to an int. - optInt(String, int) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is an int or can be coerced to an int. - optJSONArray(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is aJSONArray
. - optJSONArray(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is aJSONArray
. - optJSONObject(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is aJSONObject
. - optJSONObject(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is aJSONObject
. - optLong(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a long or can be coerced to a long. - optLong(int, long) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists and is a long or can be coerced to a long. - optLong(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a long or can be coerced to a long. - optLong(String, long) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists and is a long or can be coerced to a long. - optString(int) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists, coercing it if necessary. - optString(int, String) - Method in class org.json.JSONArray
-
Returns the value at
index
if it exists, coercing it if necessary. - optString(String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists, coercing it if necessary. - optString(String, String) - Method in class org.json.JSONObject
-
Returns the value mapped by
name
if it exists, coercing it if necessary. - org.json - package org.json
P
- put(boolean) - Method in class org.json.JSONArray
-
Appends
value
to the end of this array. - put(double) - Method in class org.json.JSONArray
-
Appends
value
to the end of this array. - put(int) - Method in class org.json.JSONArray
-
Appends
value
to the end of this array. - put(int, boolean) - Method in class org.json.JSONArray
-
Sets the value at
index
tovalue
, null padding this array to the required length if necessary. - put(int, double) - Method in class org.json.JSONArray
-
Sets the value at
index
tovalue
, null padding this array to the required length if necessary. - put(int, int) - Method in class org.json.JSONArray
-
Sets the value at
index
tovalue
, null padding this array to the required length if necessary. - put(int, long) - Method in class org.json.JSONArray
-
Sets the value at
index
tovalue
, null padding this array to the required length if necessary. - put(int, Object) - Method in class org.json.JSONArray
-
Sets the value at
index
tovalue
, null padding this array to the required length if necessary. - put(long) - Method in class org.json.JSONArray
-
Appends
value
to the end of this array. - put(Object) - Method in class org.json.JSONArray
-
Appends
value
to the end of this array. - put(String, boolean) - Method in class org.json.JSONObject
-
Maps
name
tovalue
, clobbering any existing name/value mapping with the same name. - put(String, double) - Method in class org.json.JSONObject
-
Maps
name
tovalue
, clobbering any existing name/value mapping with the same name. - put(String, int) - Method in class org.json.JSONObject
-
Maps
name
tovalue
, clobbering any existing name/value mapping with the same name. - put(String, long) - Method in class org.json.JSONObject
-
Maps
name
tovalue
, clobbering any existing name/value mapping with the same name. - put(String, Object) - Method in class org.json.JSONObject
-
Maps
name
tovalue
, clobbering any existing name/value mapping with the same name. - putOpt(String, Object) - Method in class org.json.JSONObject
-
Equivalent to
put(name, value)
when both parameters are non-null; does nothing otherwise.
Q
- quote(String) - Static method in class org.json.JSONObject
-
Encodes
data
as a JSON string.
R
- remove(String) - Method in class org.json.JSONObject
-
Removes the named mapping if it exists; does nothing otherwise.
S
- skipPast(String) - Method in class org.json.JSONTokener
-
Advances past all input up to and including the next occurrence of
thru
. - skipTo(char) - Method in class org.json.JSONTokener
-
Advances past all input up to but not including the next occurrence of
to
. - syntaxError(String) - Method in class org.json.JSONTokener
-
Returns an exception containing the given message plus the current position and the entire input string.
T
- toJSONArray(JSONArray) - Method in class org.json.JSONObject
-
Returns an array with the values corresponding to
names
. - toJSONObject(JSONArray) - Method in class org.json.JSONArray
-
Returns a new object whose values are the values in this array, and whose names are the values in
names
. - toString() - Method in class org.json.JSONArray
-
Encodes this array as a compact JSON string, such as:
- toString() - Method in class org.json.JSONObject
-
Encodes this object as a compact JSON string, such as:
- toString() - Method in class org.json.JSONStringer
-
Returns the encoded JSON string.
- toString() - Method in class org.json.JSONTokener
-
Returns the current position and the entire input string.
- toString(int) - Method in class org.json.JSONArray
-
Encodes this array as a human readable JSON string for debugging, such as:
- toString(int) - Method in class org.json.JSONObject
-
Encodes this object as a human readable JSON string for debugging, such as:
V
- value(boolean) - Method in class org.json.JSONStringer
-
Encodes
value
to this stringer. - value(double) - Method in class org.json.JSONStringer
-
Encodes
value
to this stringer. - value(long) - Method in class org.json.JSONStringer
-
Encodes
value
to this stringer. - value(Object) - Method in class org.json.JSONStringer
-
Encodes
value
.
All Classes and Interfaces|All Packages|Serialized Form