Example usage for Java twitter4j JSONObject fields, constructors, methods, implement or subclass
The text is from its open source code.
JSONObject(Map copyFrom) Creates a new JSONObject by copying all name/value mappings from the given map. | |
JSONObject(JSONTokener readFrom) Creates a new JSONObject with name/value mappings from the next object in the tokener. | |
JSONObject(String json) Creates a new JSONObject with name/value mappings from the JSON string. | |
JSONObject() Creates a JSONObject with no name/value mappings. |
Object | get(String name) Returns the value mapped by name , or throws if no such mapping exists. |
JSONArray | getJSONArray(String name) Returns the value mapped by name if it exists and is a JSONArray , or throws otherwise. |
JSONObject | getJSONObject(String name) Returns the value mapped by name if it exists and is a JSONObject , or throws otherwise. |
long | getLong(String name) Returns the value mapped by name if it exists and is a long or can be coerced to a long, or throws otherwise. |
String | getString(String name) Returns the value mapped by name if it exists, coercing it if necessary, or throws if no such mapping exists. |
boolean | has(String name) Returns true if this object has a mapping for name . |
Iterator | keys() Returns an iterator of the String names in this object. |
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. |
String | toString() Encodes this object as a compact JSON string, such as: {"query":"Pizza","locations":[94043,90210]} |
String | toString(int indentSpaces) Encodes this object as a human readable JSON string for debugging, such as: { "query": "Pizza", "locations": [ 94043, 90210 ] } |