Class of org.json · JSONObject.java · Android's reference
public class JSONObject
A JSON object: names in the order they were put, as Android's keeps them.
public static final Object NULL sourceJSON's null, apart from a missing value
public JSONObject() sourcepublic JSONObject(Map copyFrom) sourcepublic JSONObject(JSONTokener readFrom) throws JSONException sourcepublic JSONObject(String json) throws JSONException sourcepublic JSONObject(JSONObject copyFrom, String[] names) throws JSONException sourcepublic int length() sourcepublic JSONObject put(String name, boolean value) throws JSONException sourcepublic JSONObject put(String name, double value) throws JSONException sourcepublic JSONObject put(String name, int value) throws JSONException sourcepublic JSONObject put(String name, long value) throws JSONException sourcepublic JSONObject put(String name, Object value) throws JSONException sourcepublic JSONObject putOpt(String name, Object value) throws JSONException sourcepublic JSONObject accumulate(String name, Object value) throws JSONException sourcepublic JSONObject append(String name, Object value) throws JSONException sourcepublic Object remove(String name) sourcepublic boolean isNull(String name) sourcepublic boolean has(String name) sourcepublic Object get(String name) throws JSONException sourcepublic Object opt(String name) sourcepublic boolean getBoolean(String name) throws JSONException sourcepublic boolean optBoolean(String name) sourcepublic boolean optBoolean(String name, boolean fallback) sourcepublic double getDouble(String name) throws JSONException sourcepublic double optDouble(String name) sourcepublic double optDouble(String name, double fallback) sourcepublic int getInt(String name) throws JSONException sourcepublic int optInt(String name) sourcepublic int optInt(String name, int fallback) sourcepublic long getLong(String name) throws JSONException sourcepublic long optLong(String name) sourcepublic long optLong(String name, long fallback) sourcepublic String getString(String name) throws JSONException sourcepublic String optString(String name) sourcepublic String optString(String name, String fallback) sourcepublic JSONArray getJSONArray(String name) throws JSONException sourcepublic JSONArray optJSONArray(String name) sourcepublic JSONObject getJSONObject(String name) throws JSONException sourcepublic JSONObject optJSONObject(String name) sourcepublic JSONArray toJSONArray(JSONArray names) throws JSONException sourcepublic Iterator<String> keys() sourcepublic Set<String> keySet() sourcepublic JSONArray names() sourcepublic String toString() sourcepublic String toString(int indentSpaces) throws JSONException sourcepublic static String numberToString(Number number) throws JSONException sourcepublic static String quote(String data) sourcepublic static Object wrap(Object o) sourceA Java value as a JSON one: collections and maps become arrays and objects
Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.