Package com.liferay.portal.json
Class JSONObjectImpl
Object
com.liferay.portal.json.JSONObjectImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.json.JSONObject
,com.liferay.portal.kernel.json.JSONSerializable
,Externalizable
,Serializable
- Direct Known Subclasses:
UnmodifiableJSONObjectImpl
- Author:
- Brian Wing Shun Chan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJSONObjectImpl
(com.liferay.portal.kernel.json.JSONObject jsonObject, String[] names) JSONObjectImpl
(Object bean) JSONObjectImpl
(Object object, String[] names) JSONObjectImpl
(String json) JSONObjectImpl
(Map<?, ?> map) JSONObjectImpl
(org.json.JSONObject jsonObject) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoolean
(String key) boolean
getBoolean
(String key, boolean defaultValue) double
double
int
int
com.liferay.portal.kernel.json.JSONArray
getJSONArray
(String key) org.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
getJSONObject
(String key) long
long
boolean
boolean
keys()
keySet()
int
length()
com.liferay.portal.kernel.json.JSONArray
names()
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
com.liferay.portal.kernel.json.JSONObject
putException
(Exception exception1) void
readExternal
(ObjectInput objectInput) toMap()
toString()
toString
(int indentFactor) void
writeExternal
(ObjectOutput objectOutput)
-
Constructor Details
-
JSONObjectImpl
public JSONObjectImpl() -
JSONObjectImpl
public JSONObjectImpl(com.liferay.portal.kernel.json.JSONObject jsonObject, String[] names) throws com.liferay.portal.kernel.json.JSONException - Throws:
com.liferay.portal.kernel.json.JSONException
-
JSONObjectImpl
public JSONObjectImpl(org.json.JSONObject jsonObject) -
JSONObjectImpl
-
JSONObjectImpl
-
JSONObjectImpl
-
JSONObjectImpl
- Throws:
com.liferay.portal.kernel.json.JSONException
-
-
Method Details
-
get
- Specified by:
get
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getBoolean
- Specified by:
getBoolean
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getBoolean
- Specified by:
getBoolean
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getDouble
- Specified by:
getDouble
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getDouble
- Specified by:
getDouble
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getInt
- Specified by:
getInt
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getInt
- Specified by:
getInt
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getJSONArray
- Specified by:
getJSONArray
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getJSONObject
public org.json.JSONObject getJSONObject() -
getJSONObject
- Specified by:
getJSONObject
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getLong
- Specified by:
getLong
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getLong
- Specified by:
getLong
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getString
- Specified by:
getString
in interfacecom.liferay.portal.kernel.json.JSONObject
-
getString
- Specified by:
getString
in interfacecom.liferay.portal.kernel.json.JSONObject
-
has
- Specified by:
has
in interfacecom.liferay.portal.kernel.json.JSONObject
-
isNull
- Specified by:
isNull
in interfacecom.liferay.portal.kernel.json.JSONObject
-
keys
- Specified by:
keys
in interfacecom.liferay.portal.kernel.json.JSONObject
-
keySet
- Specified by:
keySet
in interfacecom.liferay.portal.kernel.json.JSONObject
-
length
public int length()- Specified by:
length
in interfacecom.liferay.portal.kernel.json.JSONObject
-
names
public com.liferay.portal.kernel.json.JSONArray names()- Specified by:
names
in interfacecom.liferay.portal.kernel.json.JSONObject
-
opt
- Specified by:
opt
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
public com.liferay.portal.kernel.json.JSONObject put(String key, com.liferay.portal.kernel.json.JSONArray jsonArray) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
public com.liferay.portal.kernel.json.JSONObject put(String key, com.liferay.portal.kernel.json.JSONObject jsonObject) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
put
public com.liferay.portal.kernel.json.JSONObject put(String key, com.liferay.petra.function.UnsafeSupplier<Object, Exception> valueUnsafeSupplier) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONObject
-
putException
- Specified by:
putException
in interfacecom.liferay.portal.kernel.json.JSONObject
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
-
remove
- Specified by:
remove
in interfacecom.liferay.portal.kernel.json.JSONObject
-
toJSONString
- Specified by:
toJSONString
in interfacecom.liferay.portal.kernel.json.JSONSerializable
-
toMap
- Specified by:
toMap
in interfacecom.liferay.portal.kernel.json.JSONObject
-
toString
-
toString
- Specified by:
toString
in interfacecom.liferay.portal.kernel.json.JSONObject
- Throws:
com.liferay.portal.kernel.json.JSONException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.json.JSONObject
- Throws:
com.liferay.portal.kernel.json.JSONException
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-