public class JSONObjectImpl
extends Object
implements com.liferay.portal.kernel.json.JSONObject
| Constructor and Description |
|---|
JSONObjectImpl() |
JSONObjectImpl(org.json.JSONObject jsonObject) |
JSONObjectImpl(com.liferay.portal.kernel.json.JSONObject jsonObject,
String[] names) |
JSONObjectImpl(Map<?,?> map) |
JSONObjectImpl(Object bean) |
JSONObjectImpl(Object obj,
String[] names) |
JSONObjectImpl(String json) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String key) |
boolean |
getBoolean(String key) |
boolean |
getBoolean(String key,
boolean defaultValue) |
double |
getDouble(String key) |
double |
getDouble(String key,
double defaultValue) |
int |
getInt(String key) |
int |
getInt(String key,
int defaultValue) |
com.liferay.portal.kernel.json.JSONArray |
getJSONArray(String key) |
org.json.JSONObject |
getJSONObject() |
com.liferay.portal.kernel.json.JSONObject |
getJSONObject(String key) |
long |
getLong(String key) |
long |
getLong(String key,
long defaultValue) |
String |
getString(String key) |
String |
getString(String key,
String defaultValue) |
boolean |
has(String key) |
boolean |
isNull(String key) |
Iterator<String> |
keys() |
Set<String> |
keySet() |
int |
length() |
com.liferay.portal.kernel.json.JSONArray |
names() |
Object |
opt(String key) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
boolean value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
Date value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
double value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
int value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
com.liferay.portal.kernel.json.JSONArray value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
com.liferay.portal.kernel.json.JSONObject value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
long value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
Object value) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
String value) |
com.liferay.portal.kernel.json.JSONObject |
putException(Exception exception) |
void |
readExternal(ObjectInput objectInput) |
Object |
remove(String key) |
String |
toJSONString() |
String |
toString() |
String |
toString(int indentFactor) |
Writer |
write(Writer writer) |
void |
writeExternal(ObjectOutput objectOutput) |
public JSONObjectImpl()
public JSONObjectImpl(com.liferay.portal.kernel.json.JSONObject jsonObject,
String[] names)
throws com.liferay.portal.kernel.json.JSONException
com.liferay.portal.kernel.json.JSONExceptionpublic JSONObjectImpl(Map<?,?> map)
public JSONObjectImpl(Object bean)
public JSONObjectImpl(Object obj,
String[] names)
public JSONObjectImpl(org.json.JSONObject jsonObject)
public JSONObjectImpl(String json)
throws com.liferay.portal.kernel.json.JSONException
com.liferay.portal.kernel.json.JSONExceptionpublic Object get(String key)
get in interface com.liferay.portal.kernel.json.JSONObjectpublic boolean getBoolean(String key)
getBoolean in interface com.liferay.portal.kernel.json.JSONObjectpublic boolean getBoolean(String key,
boolean defaultValue)
getBoolean in interface com.liferay.portal.kernel.json.JSONObjectpublic double getDouble(String key)
getDouble in interface com.liferay.portal.kernel.json.JSONObjectpublic double getDouble(String key,
double defaultValue)
getDouble in interface com.liferay.portal.kernel.json.JSONObjectpublic int getInt(String key)
getInt in interface com.liferay.portal.kernel.json.JSONObjectpublic int getInt(String key,
int defaultValue)
getInt in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONArray getJSONArray(String key)
getJSONArray in interface com.liferay.portal.kernel.json.JSONObjectpublic org.json.JSONObject getJSONObject()
public com.liferay.portal.kernel.json.JSONObject getJSONObject(String key)
getJSONObject in interface com.liferay.portal.kernel.json.JSONObjectpublic long getLong(String key)
getLong in interface com.liferay.portal.kernel.json.JSONObjectpublic long getLong(String key,
long defaultValue)
getLong in interface com.liferay.portal.kernel.json.JSONObjectpublic String getString(String key)
getString in interface com.liferay.portal.kernel.json.JSONObjectpublic String getString(String key,
String defaultValue)
getString in interface com.liferay.portal.kernel.json.JSONObjectpublic boolean has(String key)
has in interface com.liferay.portal.kernel.json.JSONObjectpublic boolean isNull(String key)
isNull in interface com.liferay.portal.kernel.json.JSONObjectpublic Iterator<String> keys()
keys in interface com.liferay.portal.kernel.json.JSONObjectpublic Set<String> keySet()
keySet in interface com.liferay.portal.kernel.json.JSONObjectpublic int length()
length in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONArray names()
names in interface com.liferay.portal.kernel.json.JSONObjectpublic Object opt(String key)
opt in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
boolean value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
Date value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
double value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
int value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
com.liferay.portal.kernel.json.JSONArray value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
com.liferay.portal.kernel.json.JSONObject value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
long value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
Object value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject put(String key,
String value)
put in interface com.liferay.portal.kernel.json.JSONObjectpublic com.liferay.portal.kernel.json.JSONObject putException(Exception exception)
putException in interface com.liferay.portal.kernel.json.JSONObjectpublic void readExternal(ObjectInput objectInput)
throws IOException
readExternal in interface ExternalizableIOExceptionpublic Object remove(String key)
remove in interface com.liferay.portal.kernel.json.JSONObjectpublic String toJSONString()
toJSONString in interface com.liferay.portal.kernel.json.JSONSerializablepublic String toString()
toString in interface com.liferay.portal.kernel.json.JSONObjecttoString in class Objectpublic String toString(int indentFactor)
throws com.liferay.portal.kernel.json.JSONException
toString in interface com.liferay.portal.kernel.json.JSONObjectcom.liferay.portal.kernel.json.JSONExceptionpublic Writer write(Writer writer)
throws com.liferay.portal.kernel.json.JSONException
write in interface com.liferay.portal.kernel.json.JSONObjectcom.liferay.portal.kernel.json.JSONExceptionpublic void writeExternal(ObjectOutput objectOutput)
throws IOException
writeExternal in interface ExternalizableIOException