JSONObject
A JSONObject is produced by a JSONReader when an object is read. Each key of the object is a String and each value is a JSONData.
Author
Todd L Smith
Parameters
The field assignments of the JSONObject as a Map from keys to values. This must not be modified by the caller afterward; this call transfers ownership of the reference.
Types
Functions
Does the JSONObject include a binding for the specified key?
Get a JSONArray associated with requested key, or null if no such key exists.
Get a BigDecimal associated with requested key.
Get a BigDecimal associated with requested key, or null if no such key exists.
Get a BigInteger associated with requested key.
Get a BigInteger associated with requested key, or null if no such key exists.
Get a Boolean associated with requested key.
Get a Boolean associated with requested key, or null if no such key exists.
Get a Double associated with requested key, or null if no such key exists.
Get a Float associated with requested key, or null if no such key exists.
Get a Int associated with requested key, or null if no such key exists.
Get a Long associated with requested key, or null if no such key exists.
Get a JSONNumber associated with requested key.
Get a JSONNumber associated with requested key, or null if no such key exists.
Get a JSONObject associated with requested key.
Get a JSONObject associated with requested key, or null if no such key exists.
Get a String associated with requested key, or null if no such key exists.
Properties
If this is a JSONNumber, extract its value as a BigDecimal, otherwise throw a ClassCastException.
If this is a JSONNumber, extract its value as a BigInteger, otherwise throw a ClassCastException. If the value has a non-zero fractional part, throw an ArithmeticException.
Extract a Boolean, or throw a ClassCastException if the value is not a boolean.
If this is a JSONNumber, extract its value as a Double, otherwise throw a ClassCastException.
If this is a JSONNumber, extract its value as a Float, otherwise throw a ClassCastException.
If this is a JSONNumber, extract its value as an Int, otherwise throw a ClassCastException. If the value has a non-zero fractional part or is out of range, throw an ArithmeticException.
If this is a JSONNumber, extract its value as a Long, otherwise throw a ClassCastException. If the value has a non-zero fractional part or is out of range, throw an ArithmeticException.
Extract a String, or throw a ClassCastException if the value is not a string.