Uses of Class
org.json.JSONObject

  • Uses of JSONObject in org.json

    Methods in org.json that return JSONObject
    Modifier and Type
    Method
    Description
    JSONObject.accumulate(String name, Object value)
    Appends value to the array already mapped to name.
    JSONArray.getJSONObject(int index)
    Returns the value at index if it exists and is a JSONObject.
    JSONObject.getJSONObject(String name)
    Returns the value mapped by name if it exists and is a JSONObject.
    JSONArray.optJSONObject(int index)
    Returns the value at index if it exists and is a JSONObject.
    JSONObject.optJSONObject(String name)
    Returns the value mapped by name if it exists and is a JSONObject.
    JSONObject.put(String name, boolean value)
    Maps name to value, clobbering any existing name/value mapping with the same name.
    JSONObject.put(String name, double value)
    Maps name to value, clobbering any existing name/value mapping with the same name.
    JSONObject.put(String name, int value)
    Maps name to value, clobbering any existing name/value mapping with the same name.
    JSONObject.put(String name, long value)
    Maps name to value, clobbering any existing name/value mapping with the same name.
    JSONObject.put(String name, Object value)
    Maps name to value, clobbering any existing name/value mapping with the same name.
    JSONObject.putOpt(String name, Object value)
    Equivalent to put(name, value) when both parameters are non-null; does nothing otherwise.
    JSONArray.toJSONObject(JSONArray names)
    Returns a new object whose values are the values in this array, and whose names are the values in names.
    Constructors in org.json with parameters of type JSONObject
    Modifier
    Constructor
    Description
     
    JSONObject(JSONObject copyFrom, String[] names)
    Creates a new JSONObject by copying mappings for the listed names from the given object.