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 object,
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 jsonArray) |
com.liferay.portal.kernel.json.JSONObject |
put(String key,
com.liferay.portal.kernel.json.JSONObject jsonObject) |
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 |
put(String key,
com.liferay.petra.function.UnsafeSupplier<Object,Exception> valueUnsafeSupplier) |
com.liferay.portal.kernel.json.JSONObject |
putException(Exception exception1) |
void |
readExternal(ObjectInput objectInput) |
Object |
remove(String key) |
String |
toJSONString() |
Map<String,Object> |
toMap() |
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.JSONException
public JSONObjectImpl(org.json.JSONObject jsonObject)
public JSONObjectImpl(Map<?,?> map)
public JSONObjectImpl(Object bean)
public JSONObjectImpl(Object object, String[] names)
public JSONObjectImpl(String json) throws com.liferay.portal.kernel.json.JSONException
com.liferay.portal.kernel.json.JSONException
public Object get(String key)
get
in interface com.liferay.portal.kernel.json.JSONObject
public boolean getBoolean(String key)
getBoolean
in interface com.liferay.portal.kernel.json.JSONObject
public boolean getBoolean(String key, boolean defaultValue)
getBoolean
in interface com.liferay.portal.kernel.json.JSONObject
public double getDouble(String key)
getDouble
in interface com.liferay.portal.kernel.json.JSONObject
public double getDouble(String key, double defaultValue)
getDouble
in interface com.liferay.portal.kernel.json.JSONObject
public int getInt(String key)
getInt
in interface com.liferay.portal.kernel.json.JSONObject
public int getInt(String key, int defaultValue)
getInt
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONArray getJSONArray(String key)
getJSONArray
in interface com.liferay.portal.kernel.json.JSONObject
public org.json.JSONObject getJSONObject()
public com.liferay.portal.kernel.json.JSONObject getJSONObject(String key)
getJSONObject
in interface com.liferay.portal.kernel.json.JSONObject
public long getLong(String key)
getLong
in interface com.liferay.portal.kernel.json.JSONObject
public long getLong(String key, long defaultValue)
getLong
in interface com.liferay.portal.kernel.json.JSONObject
public String getString(String key)
getString
in interface com.liferay.portal.kernel.json.JSONObject
public String getString(String key, String defaultValue)
getString
in interface com.liferay.portal.kernel.json.JSONObject
public boolean has(String key)
has
in interface com.liferay.portal.kernel.json.JSONObject
public boolean isNull(String key)
isNull
in interface com.liferay.portal.kernel.json.JSONObject
public Iterator<String> keys()
keys
in interface com.liferay.portal.kernel.json.JSONObject
public Set<String> keySet()
keySet
in interface com.liferay.portal.kernel.json.JSONObject
public int length()
length
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONArray names()
names
in interface com.liferay.portal.kernel.json.JSONObject
public Object opt(String key)
opt
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, boolean value)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, Date value)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, double value)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, int value)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, com.liferay.portal.kernel.json.JSONArray jsonArray)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, com.liferay.portal.kernel.json.JSONObject jsonObject)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, long value)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, Object value)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, String value)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject put(String key, com.liferay.petra.function.UnsafeSupplier<Object,Exception> valueUnsafeSupplier)
put
in interface com.liferay.portal.kernel.json.JSONObject
public com.liferay.portal.kernel.json.JSONObject putException(Exception exception1)
putException
in interface com.liferay.portal.kernel.json.JSONObject
public void readExternal(ObjectInput objectInput) throws IOException
readExternal
in interface Externalizable
IOException
public Object remove(String key)
remove
in interface com.liferay.portal.kernel.json.JSONObject
public String toJSONString()
toJSONString
in interface com.liferay.portal.kernel.json.JSONSerializable
public Map<String,Object> toMap()
toMap
in interface com.liferay.portal.kernel.json.JSONObject
public String toString()
toString
in interface com.liferay.portal.kernel.json.JSONObject
toString
in class Object
public String toString(int indentFactor) throws com.liferay.portal.kernel.json.JSONException
toString
in interface com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONException
public Writer write(Writer writer) throws com.liferay.portal.kernel.json.JSONException
write
in interface com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONException
public void writeExternal(ObjectOutput objectOutput) throws IOException
writeExternal
in interface Externalizable
IOException