Package com.liferay.portal.kernel.json
Class JSONFactoryUtil
Object
com.liferay.portal.kernel.json.JSONFactoryUtil
- Author:
- Brian Wing Shun Chan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertJSONMLArrayToXML
(String jsonml) static String
convertJSONMLObjectToXML
(String jsonml) static String
static String
static JSONTransformer
createJavaScriptNormalizerJSONTransformer
(List<String> javaScriptAttributes) static JSONArray
static JSONArray
createJSONArray
(String json) static JSONArray
createJSONArray
(Collection<?> collection) static <T> JSONArray
createJSONArray
(T[] array) static <T> JSONDeserializer<T>
static JSONObject
static JSONObject
createJSONObject
(String json) static JSONObject
createJSONObject
(Map<?, ?> map) static JSONSerializer
static Object
deserialize
(JSONObject jsonObject) static Object
deserialize
(String json) static JSONFactory
static String
static JSONObject
static Object
looseDeserialize
(String json) static <T> T
looseDeserialize
(String json, Class<T> clazz) static String
looseSerialize
(Object object) static String
looseSerialize
(Object object, JSONTransformer jsonTransformer, Class<?> clazz) static String
looseSerialize
(Object object, String... includes) static String
looseSerializeDeep
(Object object) static String
looseSerializeDeep
(Object object, JSONTransformer jsonTransformer, Class<?> clazz) static String
static String
serializeThrowable
(Throwable throwable) void
setJSONFactory
(JSONFactory jsonFactory)
-
Constructor Details
-
JSONFactoryUtil
public JSONFactoryUtil()
-
-
Method Details
-
convertJSONMLArrayToXML
-
convertJSONMLObjectToXML
-
convertXMLtoJSONMLArray
-
convertXMLtoJSONMLObject
-
createJavaScriptNormalizerJSONTransformer
public static JSONTransformer createJavaScriptNormalizerJSONTransformer(List<String> javaScriptAttributes) -
createJSONArray
-
createJSONArray
-
createJSONArray
- Throws:
JSONException
-
createJSONArray
-
createJSONDeserializer
-
createJSONObject
-
createJSONObject
-
createJSONObject
- Throws:
JSONException
-
createJSONSerializer
-
deserialize
-
deserialize
-
getJSONFactory
-
getNullJSON
-
getUnmodifiableJSONObject
-
looseDeserialize
-
looseDeserialize
-
looseSerialize
-
looseSerialize
-
looseSerialize
-
looseSerializeDeep
-
looseSerializeDeep
public static String looseSerializeDeep(Object object, JSONTransformer jsonTransformer, Class<?> clazz) -
serialize
-
serializeThrowable
-
setJSONFactory
-