public class JSONObject extends Object
| 构造器和说明 |
|---|
JSONObject() |
JSONObject(JSONObject jo,
String[] names) |
JSONObject(JSONTokener x) |
JSONObject(Map<String,Object> map) |
JSONObject(Object bean) |
JSONObject(Object object,
String[] names) |
JSONObject(String source) |
JSONObject(String baseName,
Locale locale) |
public static final Object NULL
public JSONObject()
public JSONObject(JSONObject jo, String[] names)
public JSONObject(JSONTokener x) throws JSONException
public JSONObject(Object bean)
public JSONObject(String source) throws JSONException
public JSONObject(String baseName, Locale locale) throws JSONException
public JSONObject accumulate(String key, Object value) throws JSONException
public JSONObject append(String key, Object value) throws JSONException
public static String doubleToString(double d)
public Object get(String key) throws JSONException
public boolean getBoolean(String key) throws JSONException
public double getDouble(String key) throws JSONException
public int getInt(String key) throws JSONException
public JSONArray getJSONArray(String key) throws JSONException
public JSONObject getJSONObject(String key) throws JSONException
public long getLong(String key) throws JSONException
public static String[] getNames(JSONObject jo)
public String getString(String key) throws JSONException
public boolean has(String key)
public JSONObject increment(String key) throws JSONException
public boolean isNull(String key)
public int length()
public JSONArray names()
public static String numberToString(Number number) throws JSONException
public boolean optBoolean(String key)
public boolean optBoolean(String key, boolean defaultValue)
public double optDouble(String key)
public double optDouble(String key, double defaultValue)
public int optInt(String key)
public int optInt(String key, int defaultValue)
public JSONObject optJSONObject(String key)
public long optLong(String key)
public long optLong(String key, long defaultValue)
public JSONObject put(String key, boolean value) throws JSONException
public JSONObject put(String key, Collection<Object> value) throws JSONException
public JSONObject put(String key, double value) throws JSONException
public JSONObject put(String key, int value) throws JSONException
public JSONObject put(String key, long value) throws JSONException
public JSONObject put(String key, Map<String,Object> value) throws JSONException
public JSONObject put(String key, Object value) throws JSONException
public JSONObject putOnce(String key, Object value) throws JSONException
public JSONObject putOpt(String key, Object value) throws JSONException
public static Writer quote(String string, Writer w) throws IOException
public boolean similar(Object other)
public static void testValidity(Object o) throws JSONException
public JSONArray toJSONArray(JSONArray names) throws JSONException
public String toString()
public String toString(int indentFactor) throws JSONException
public static String valueToString(Object value) throws JSONException
public Writer write(Writer writer) throws JSONException
Copyright © 2015. All rights reserved.