public interface JSONObject extends Externalizable, JSONSerializable
Modifier and Type | Method and Description |
---|---|
Object |
get(String key) |
boolean |
getBoolean(String key) |
boolean |
getBoolean(String key,
boolean defaultValue) |
double |
getDouble(String key) |
double |
getDouble(String key,
double defaultValue) |
int |
getInt(String key) |
int |
getInt(String key,
int defaultValue) |
JSONArray |
getJSONArray(String key) |
JSONObject |
getJSONObject(String key) |
long |
getLong(String key) |
long |
getLong(String key,
long defaultValue) |
String |
getString(String key) |
String |
getString(String key,
String defaultValue) |
boolean |
has(String key) |
boolean |
isNull(String key) |
Iterator<String> |
keys() |
int |
length() |
JSONArray |
names() |
JSONObject |
put(String key,
boolean value) |
JSONObject |
put(String key,
Date value) |
JSONObject |
put(String key,
double value) |
JSONObject |
put(String key,
int value) |
JSONObject |
put(String key,
JSONArray value) |
JSONObject |
put(String key,
JSONObject value) |
JSONObject |
put(String key,
long value) |
JSONObject |
put(String key,
Object value) |
JSONObject |
put(String key,
String value) |
JSONObject |
putException(Exception exception) |
Object |
remove(String key) |
String |
toString() |
String |
toString(int indentFactor) |
Writer |
write(Writer writer) |
toJSONString
Object get(String key)
boolean getBoolean(String key)
boolean getBoolean(String key, boolean defaultValue)
double getDouble(String key)
double getDouble(String key, double defaultValue)
int getInt(String key)
int getInt(String key, int defaultValue)
JSONArray getJSONArray(String key)
JSONObject getJSONObject(String key)
long getLong(String key)
long getLong(String key, long defaultValue)
String getString(String key)
String getString(String key, String defaultValue)
boolean has(String key)
boolean isNull(String key)
Iterator<String> keys()
int length()
JSONArray names()
JSONObject put(String key, boolean value)
JSONObject put(String key, Date value)
JSONObject put(String key, double value)
JSONObject put(String key, int value)
JSONObject put(String key, JSONArray value)
JSONObject put(String key, JSONObject value)
JSONObject put(String key, long value)
JSONObject put(String key, Object value)
JSONObject put(String key, String value)
JSONObject putException(Exception exception)
Object remove(String key)
String toString()
toString
in class Object
String toString(int indentFactor) throws JSONException
JSONException
Writer write(Writer writer) throws JSONException
JSONException