A B C D E G H I J K L M N O P Q R S T V W 
All Classes All Packages

A

accumulate(String, Object) - Method in class com.github.openjson.JSONObject
Appends value to the array already mapped to name.
append(String, Object) - Method in class com.github.openjson.JSONObject
Appends values to the array mapped to name.
array() - Method in class com.github.openjson.JSONStringer
Begins encoding a new array.

B

back() - Method in class com.github.openjson.JSONTokener
Unreads the most recent character of input.
beforeKey() - Method in class com.github.openjson.JSONStringer
Inserts any necessary separators and whitespace before a name.
beforeValue() - Method in class com.github.openjson.JSONStringer
Inserts any necessary separators and whitespace before a literal value, inline array, or inline object.

C

checkDouble(double) - Static method in class com.github.openjson.JSON
Returns the input if it is a JSON-permissible value; throws otherwise.
checkedPut(Object) - Method in class com.github.openjson.JSONArray
Same as put(boolean), with added validity checks.
checkName(String) - Method in class com.github.openjson.JSONObject
 
close(JSONStringer.Scope, JSONStringer.Scope, String) - Method in class com.github.openjson.JSONStringer
Closes the current scope by appending any necessary whitespace and the given bracket.
com.github.openjson - package com.github.openjson
 
createKey(String) - Method in class com.github.openjson.JSONStringer
Creates String representation of the key (property name) to this stringer Override this method to provide your own representation of the name.

D

DANGLING_KEY - com.github.openjson.JSONStringer.Scope
An object whose most recent element is a key.
dehexchar(char) - Static method in class com.github.openjson.JSONTokener
Returns the integer [0..15] value for the given hex character, or -1 for non-hex input.

E

EMPTY_ARRAY - com.github.openjson.JSONStringer.Scope
An array with no elements requires no separators or newlines before it is closed.
EMPTY_OBJECT - com.github.openjson.JSONStringer.Scope
An object with no keys or values requires no separators or newlines before it is closed.
encode(JSONStringer) - Method in class com.github.openjson.JSONArray
Encodes this array using JSONStringer provided
encode(JSONStringer) - Method in class com.github.openjson.JSONObject
Encodes this object using JSONStringer provided
endArray() - Method in class com.github.openjson.JSONStringer
Ends encoding the current array.
endObject() - Method in class com.github.openjson.JSONStringer
Ends encoding the current object.
entry(Map.Entry<String, Object>) - Method in class com.github.openjson.JSONStringer
Encodes key/value pair to this stringer.
equals(Object) - Method in class com.github.openjson.JSONArray
 

G

get(int) - Method in class com.github.openjson.JSONArray
Returns the value at index.
get(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name, or throws if no such mapping exists.
getBoolean(int) - Method in class com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a boolean or can be coerced to a boolean, or throws otherwise.
getDouble(int) - Method in class com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a double or can be coerced to a double, or throws otherwise.
getInt(int) - Method in class com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is an int or can be coerced to an int, or throws otherwise.
getJSONArray(int) - Method in class com.github.openjson.JSONArray
Returns the value at index if it exists and is a JSONArray.
getJSONArray(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a JSONArray, or throws otherwise.
getJSONObject(int) - Method in class com.github.openjson.JSONArray
Returns the value at index if it exists and is a JSONObject.
getJSONObject(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a JSONObject, or throws otherwise.
getLong(int) - Method in class com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a long or can be coerced to a long, or throws otherwise.
getNames(JSONObject) - Static method in class com.github.openjson.JSONObject
 
getString(int) - Method in class com.github.openjson.JSONArray
Returns the value at index if it exists, coercing it if necessary.
getString(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists, coercing it if necessary, or throws if no such mapping exists.

H

has(String) - Method in class com.github.openjson.JSONObject
Returns true if this object has a mapping for name.
hashCode() - Method in class com.github.openjson.JSONArray
 

I

in - Variable in class com.github.openjson.JSONTokener
The input JSON.
indent - Variable in class com.github.openjson.JSONStringer
A string containing a full set of spaces for a single level of indentation, or null for no pretty printing.
init(JSONTokener) - Method in class com.github.openjson.JSONObject
 
init(Map) - Method in class com.github.openjson.JSONObject
 
isNull(int) - Method in class com.github.openjson.JSONArray
Returns true if this array has no value at index, or if its value is the null reference or JSONObject.NULL.
isNull(String) - Method in class com.github.openjson.JSONObject
Returns true if this object has no mapping for name or if it has a mapping whose value is JSONObject.NULL.
iterator() - Method in class com.github.openjson.JSONArray
 

J

join(String) - Method in class com.github.openjson.JSONArray
Returns a new string by alternating this array's values with separator.
JSON - Class in com.github.openjson
 
JSON() - Constructor for class com.github.openjson.JSON
 
JSONArray - Class in com.github.openjson
A dense indexed sequence of values.
JSONArray() - Constructor for class com.github.openjson.JSONArray
Creates a JSONArray with no values.
JSONArray(JSONTokener) - Constructor for class com.github.openjson.JSONArray
Creates a new JSONArray with values from the next array in the tokener.
JSONArray(Object) - Constructor for class com.github.openjson.JSONArray
Creates a new JSONArray with values from the given primitive array.
JSONArray(String) - Constructor for class com.github.openjson.JSONArray
Creates a new JSONArray with values from the JSON string.
JSONArray(Collection<?>) - Constructor for class com.github.openjson.JSONArray
Creates a new JSONArray by copying all values from the given collection.
JSONException - Exception in com.github.openjson
Thrown to indicate a problem with the JSON API.
JSONException(String) - Constructor for exception com.github.openjson.JSONException
 
JSONException(Throwable) - Constructor for exception com.github.openjson.JSONException
 
JSONObject - Class in com.github.openjson
A modifiable set of name/value mappings.
JSONObject() - Constructor for class com.github.openjson.JSONObject
Creates a JSONObject with no name/value mappings.
JSONObject(JSONObject, String[]) - Constructor for class com.github.openjson.JSONObject
Creates a new JSONObject by copying mappings for the listed names from the given object.
JSONObject(JSONTokener) - Constructor for class com.github.openjson.JSONObject
Creates a new JSONObject with name/value mappings from the next object in the tokener.
JSONObject(Object) - Constructor for class com.github.openjson.JSONObject
Creates a json object from a bean
JSONObject(String) - Constructor for class com.github.openjson.JSONObject
Creates a new JSONObject with name/value mappings from the JSON string.
JSONObject(Map) - Constructor for class com.github.openjson.JSONObject
Creates a new JSONObject by copying all name/value mappings from the given map.
JSONString - Interface in com.github.openjson
The JSONString interface allows a toJSONString() method so that a class can change the behavior of JSONObject.toString(), JSONArray.toString(), and JSONWriter.value(Object).
JSONStringer - Class in com.github.openjson
JSONStringer() - Constructor for class com.github.openjson.JSONStringer
 
JSONStringer(int) - Constructor for class com.github.openjson.JSONStringer
 
JSONStringer.Scope - Enum in com.github.openjson
Lexical scoping elements within this stringer, necessary to insert the appropriate separator characters (ie.
JSONTokener - Class in com.github.openjson
Parses a JSON (RFC 4627) encoded string into the corresponding object.
JSONTokener(Reader) - Constructor for class com.github.openjson.JSONTokener
 
JSONTokener(String) - Constructor for class com.github.openjson.JSONTokener
 

K

key(String) - Method in class com.github.openjson.JSONStringer
Encodes the key (property name) to this stringer.
keys() - Method in class com.github.openjson.JSONObject
Returns an iterator of the String names in this object.
keySet() - Method in class com.github.openjson.JSONObject
Returns the set of String names in this object.

L

length() - Method in class com.github.openjson.JSONArray
 
length() - Method in class com.github.openjson.JSONObject
Returns the number of name/value mappings in this object.

M

MAX_NESTING_LEVEL - Static variable in class com.github.openjson.JSONTokener
Maximum allowed JSON nesting level supported by the parser.
more() - Method in class com.github.openjson.JSONTokener
Returns true until the input has been exhausted.

N

names() - Method in class com.github.openjson.JSONObject
Returns an array containing the string names in this object.
nameValuePairs - Variable in class com.github.openjson.JSONObject
 
NEGATIVE_ZERO - Static variable in class com.github.openjson.JSONObject
 
newline() - Method in class com.github.openjson.JSONStringer
 
next() - Method in class com.github.openjson.JSONTokener
Returns the next available character, or the null character '\0' if all inputs have been exhausted.
next(char) - Method in class com.github.openjson.JSONTokener
Returns the next available character if it equals c.
next(int) - Method in class com.github.openjson.JSONTokener
Returns the next length characters of the input.
nextClean() - Method in class com.github.openjson.JSONTokener
Returns the next character that is not whitespace and does not belong to a comment.
nextCleanInternal() - Method in class com.github.openjson.JSONTokener
 
nextString(char) - Method in class com.github.openjson.JSONTokener
Returns the string up to but not including quote, unescaping any character escape sequences encountered along the way.
nextTo(char) - Method in class com.github.openjson.JSONTokener
Equivalent to nextTo(String.valueOf(excluded)).
nextTo(String) - Method in class com.github.openjson.JSONTokener
Returns the trimmed string holding the characters up to but not including the first of: any character in excluded a newline character '\n' a carriage return '\r'
nextToInternal(String) - Method in class com.github.openjson.JSONTokener
Returns the string up to but not including any of the given characters or a newline character.
nextValue() - Method in class com.github.openjson.JSONTokener
Returns the next value from the input.
nextValue(int) - Method in class com.github.openjson.JSONTokener
 
NONEMPTY_ARRAY - com.github.openjson.JSONStringer.Scope
A array with at least one value requires a comma and newline before the next element.
NONEMPTY_OBJECT - com.github.openjson.JSONStringer.Scope
An object with at least one name/value pair requires a comma and newline before the next element.
NULL - com.github.openjson.JSONStringer.Scope
A special bracketless array needed by JSONStringer.join() and JSONObject.quote() only.
NULL - Static variable in class com.github.openjson.JSONObject
A sentinel value used to explicitly define a name with no value.
numberToString(Number) - Static method in class com.github.openjson.JSONObject
Encodes the number as a JSON string.

O

object() - Method in class com.github.openjson.JSONStringer
Begins encoding a new object.
objectAsMap(Object) - Static method in class com.github.openjson.JSONObject
Creates a name-value map from a bean
open(JSONStringer.Scope, String) - Method in class com.github.openjson.JSONStringer
Enters a new scope by appending any necessary whitespace and the given bracket.
opt(int) - Method in class com.github.openjson.JSONArray
Returns the value at index, or null if the array has no value at index.
opt(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name, or null if no such mapping exists.
optBoolean(int) - Method in class com.github.openjson.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 com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a boolean or can be coerced to a boolean, or false otherwise.
optBoolean(String, boolean) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a boolean or can be coerced to a boolean, or fallback otherwise.
optDouble(int) - Method in class com.github.openjson.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 com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a double or can be coerced to a double, or NaN otherwise.
optDouble(String, double) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a double or can be coerced to a double, or fallback otherwise.
optInt(int) - Method in class com.github.openjson.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 com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is an int or can be coerced to an int, or 0 otherwise.
optInt(String, int) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is an int or can be coerced to an int, or fallback otherwise.
optJSONArray(int) - Method in class com.github.openjson.JSONArray
Returns the value at index if it exists and is a JSONArray.
optJSONArray(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a JSONArray, or null otherwise.
optJSONObject(int) - Method in class com.github.openjson.JSONArray
Returns the value at index if it exists and is a JSONObject.
optJSONObject(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a JSONObject, or null otherwise.
optLong(int) - Method in class com.github.openjson.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 com.github.openjson.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 com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a long or can be coerced to a long, or 0 otherwise.
optLong(String, long) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists and is a long or can be coerced to a long, or fallback otherwise.
optString(int) - Method in class com.github.openjson.JSONArray
Returns the value at index if it exists, coercing it if necessary.
optString(int, String) - Method in class com.github.openjson.JSONArray
Returns the value at index if it exists, coercing it if necessary.
optString(String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists, coercing it if necessary, or the empty string if no such mapping exists.
optString(String, String) - Method in class com.github.openjson.JSONObject
Returns the value mapped by name if it exists, coercing it if necessary, or fallback if no such mapping exists.
out - Variable in class com.github.openjson.JSONStringer
The output data, containing at most one top-level array or object.

P

peek() - Method in class com.github.openjson.JSONStringer
Returns the value on the top of the stack.
pos - Variable in class com.github.openjson.JSONTokener
The index of the next character to be returned by JSONTokener.next().
put(boolean) - Method in class com.github.openjson.JSONArray
Appends value to the end of this array.
put(double) - Method in class com.github.openjson.JSONArray
Appends value to the end of this array.
put(int) - Method in class com.github.openjson.JSONArray
Appends value to the end of this array.
put(int, boolean) - Method in class com.github.openjson.JSONArray
Sets the value at index to value, null padding this array to the required length if necessary.
put(int, double) - Method in class com.github.openjson.JSONArray
Sets the value at index to value, null padding this array to the required length if necessary.
put(int, int) - Method in class com.github.openjson.JSONArray
Sets the value at index to value, null padding this array to the required length if necessary.
put(int, long) - Method in class com.github.openjson.JSONArray
Sets the value at index to value, null padding this array to the required length if necessary.
put(int, Object) - Method in class com.github.openjson.JSONArray
Sets the value at index to value, null padding this array to the required length if necessary.
put(int, Collection<?>) - Method in class com.github.openjson.JSONArray
Sets the value at index to value wrapped into JSONArray, null padding this array to the required length if necessary.
put(long) - Method in class com.github.openjson.JSONArray
Appends value to the end of this array.
put(Object) - Method in class com.github.openjson.JSONArray
Appends value to the end of this array.
put(String, boolean) - Method in class com.github.openjson.JSONObject
Maps name to value, clobbering any existing name/value mapping with the same name.
put(String, double) - Method in class com.github.openjson.JSONObject
Maps name to value, clobbering any existing name/value mapping with the same name.
put(String, int) - Method in class com.github.openjson.JSONObject
Maps name to value, clobbering any existing name/value mapping with the same name.
put(String, long) - Method in class com.github.openjson.JSONObject
Maps name to value, clobbering any existing name/value mapping with the same name.
put(String, Object) - Method in class com.github.openjson.JSONObject
Maps name to value, clobbering any existing name/value mapping with the same name.
put(Collection<?>) - Method in class com.github.openjson.JSONArray
Appends value wrapped by JSONArray to the end of this array.
putOpt(String, Object) - Method in class com.github.openjson.JSONObject
Equivalent to put(name, value) when both parameters are non-null; does nothing otherwise.

Q

quote(String) - Static method in class com.github.openjson.JSONObject
Encodes data as a JSON string.

R

readArray(int) - Method in class com.github.openjson.JSONTokener
Reads a sequence of values and the trailing closing brace ']' of an array.
readEscapeCharacter() - Method in class com.github.openjson.JSONTokener
Unescapes the character identified by the character or characters that immediately follow a backslash.
readLiteral() - Method in class com.github.openjson.JSONTokener
Reads a null, boolean, numeric or unquoted string literal value.
readObject(int) - Method in class com.github.openjson.JSONTokener
Reads a sequence of key/value pairs and the trailing closing brace '}' of an object.
remove(int) - Method in class com.github.openjson.JSONArray
Removes and returns the value at index, or null if the array has no value at index.
remove(String) - Method in class com.github.openjson.JSONObject
Removes the named mapping if it exists; does nothing otherwise.
replaceTop(JSONStringer.Scope) - Method in class com.github.openjson.JSONStringer
Replace the value on the top of the stack with the given value.

S

Scope() - Constructor for enum com.github.openjson.JSONStringer.Scope
 
skipPast(String) - Method in class com.github.openjson.JSONTokener
Advances past all input up to and including the next occurrence of thru.
skipTo(char) - Method in class com.github.openjson.JSONTokener
Advances past all inputs up to but not including the next occurrence of to.
skipToEndOfLine() - Method in class com.github.openjson.JSONTokener
Advances the position until after the next newline character.
stack - Variable in class com.github.openjson.JSONStringer
Unlike the original implementation, this stack isn't limited to 20 levels of nesting.
string(String) - Method in class com.github.openjson.JSONStringer
 
syntaxError(String) - Method in class com.github.openjson.JSONTokener
Returns an exception containing the given message plus the current position and the entire input string.

T

toBoolean(Object) - Static method in class com.github.openjson.JSON
 
toDouble(Object) - Static method in class com.github.openjson.JSON
 
toInteger(Object) - Static method in class com.github.openjson.JSON
 
toJSONArray(JSONArray) - Method in class com.github.openjson.JSONObject
Returns an array with the values corresponding to names.
toJSONObject(JSONArray) - Method in class com.github.openjson.JSONArray
Returns a new object whose values are the values in this array, and whose names are the values in names.
toJSONString() - Method in interface com.github.openjson.JSONString
The toJSONString method allows a class to produce its own JSON serialization.
toLong(Object) - Static method in class com.github.openjson.JSON
 
toString() - Method in class com.github.openjson.JSONArray
Encodes this array as a compact JSON string, such as:
toString() - Method in class com.github.openjson.JSONObject
Encodes this object as a compact JSON string, such as:
toString() - Method in class com.github.openjson.JSONStringer
Returns the encoded JSON string.
toString() - Method in class com.github.openjson.JSONTokener
Returns the current position and the entire input string.
toString(int) - Method in class com.github.openjson.JSONArray
Encodes this array as a human readable JSON string for debugging, such as:
toString(int) - Method in class com.github.openjson.JSONObject
Encodes this object as a human readable JSON string for debugging, such as:
toString(JSONStringer) - Method in class com.github.openjson.JSONArray
Encodes this array using JSONStringer provided
toString(JSONStringer) - Method in class com.github.openjson.JSONObject
Encodes this object using JSONStringer provided
toString(Object) - Static method in class com.github.openjson.JSON
 
typeMismatch(Object, Object, String) - Static method in class com.github.openjson.JSON
 
typeMismatch(Object, String) - Static method in class com.github.openjson.JSON
 

V

value(boolean) - Method in class com.github.openjson.JSONStringer
Encodes value to this stringer.
value(double) - Method in class com.github.openjson.JSONStringer
Encodes value to this stringer.
value(long) - Method in class com.github.openjson.JSONStringer
Encodes value to this stringer.
value(Object) - Method in class com.github.openjson.JSONStringer
Encodes value.
valueOf(String) - Static method in enum com.github.openjson.JSONStringer.Scope
Returns the enum constant of this type with the specified name.
values - Variable in class com.github.openjson.JSONArray
 
values() - Static method in enum com.github.openjson.JSONStringer.Scope
Returns an array containing the constants of this enum type, in the order they are declared.

W

wrap(Object) - Static method in class com.github.openjson.JSONObject
Wraps the given object if necessary.
A B C D E G H I J K L M N O P Q R S T V W 
All Classes All Packages