Java twitter4j JSONObject fields, constructors, methods, implement or subclass

Example usage for Java twitter4j JSONObject fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for twitter4j JSONObject.

The text is from its open source code.

Constructor

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.

Method

Objectget(String name)
Returns the value mapped by name , or throws if no such mapping exists.
JSONArraygetJSONArray(String name)
Returns the value mapped by name if it exists and is a JSONArray , or throws otherwise.
JSONObjectgetJSONObject(String name)
Returns the value mapped by name if it exists and is a JSONObject , or throws otherwise.
longgetLong(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.
StringgetString(String name)
Returns the value mapped by name if it exists, coercing it if necessary, or throws if no such mapping exists.
booleanhas(String name)
Returns true if this object has a mapping for name .
Iteratorkeys()
Returns an iterator of the String names in this object.
JSONObjectput(String name, boolean value)
Maps name to value , clobbering any existing name/value mapping with the same name.
JSONObjectput(String name, double value)
Maps name to value , clobbering any existing name/value mapping with the same name.
JSONObjectput(String name, int value)
Maps name to value , clobbering any existing name/value mapping with the same name.
JSONObjectput(String name, long value)
Maps name to value , clobbering any existing name/value mapping with the same name.
JSONObjectput(String name, Object value)
Maps name to value , clobbering any existing name/value mapping with the same name.
StringtoString()
Encodes this object as a compact JSON string, such as:
{"query":"Pizza","locations":[94043,90210]}
StringtoString(int indentSpaces)
Encodes this object as a human readable JSON string for debugging, such as:
 { "query": "Pizza", "locations": [ 94043, 90210 ] }