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 StringconvertJSONMLArrayToXML(String jsonml) static StringconvertJSONMLObjectToXML(String jsonml) static Stringstatic Stringstatic JSONTransformercreateJavaScriptNormalizerJSONTransformer(List<String> javaScriptAttributes) static JSONArraystatic JSONArraycreateJSONArray(String json) static JSONArraycreateJSONArray(Collection<?> collection) static <T> JSONArraycreateJSONArray(T[] array) static <T> JSONDeserializer<T>static JSONObjectstatic JSONObjectcreateJSONObject(String json) static JSONObjectcreateJSONObject(Map<?, ?> map) static JSONSerializerstatic Objectdeserialize(JSONObject jsonObject) static Objectdeserialize(String json) static JSONFactorystatic Stringstatic JSONObjectstatic ObjectlooseDeserialize(String json) static <T> TlooseDeserialize(String json, Class<T> clazz) static StringlooseSerialize(Object object) static StringlooseSerialize(Object object, JSONTransformer jsonTransformer, Class<?> clazz) static StringlooseSerialize(Object object, String... includes) static StringlooseSerializeDeep(Object object) static StringlooseSerializeDeep(Object object, JSONTransformer jsonTransformer, Class<?> clazz) static Stringstatic StringserializeThrowable(Throwable throwable) voidsetJSONFactory(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
-