com.liferay.portal.kernel.json
Class JSONFactoryUtil
java.lang.Object
com.liferay.portal.kernel.json.JSONFactoryUtil
- Direct Known Subclasses:
- JSONFactoryUtil
public class JSONFactoryUtil
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONFactoryUtil
public JSONFactoryUtil()
convertJSONMLArrayToXML
public static String convertJSONMLArrayToXML(String jsonml)
convertJSONMLObjectToXML
public static String convertJSONMLObjectToXML(String jsonml)
convertXMLtoJSONMLArray
public static String convertXMLtoJSONMLArray(String xml)
convertXMLtoJSONMLObject
public static String convertXMLtoJSONMLObject(String xml)
createJavaScriptNormalizerJSONTransformer
public static JSONTransformer createJavaScriptNormalizerJSONTransformer(List<String> javaScriptAttributes)
createJSONArray
public static JSONArray createJSONArray()
createJSONArray
public static JSONArray createJSONArray(String json)
throws JSONException
- Throws:
JSONException
createJSONDeserializer
public static <T> JSONDeserializer<T> createJSONDeserializer()
createJSONObject
public static JSONObject createJSONObject()
createJSONObject
public static JSONObject createJSONObject(String json)
throws JSONException
- Throws:
JSONException
createJSONSerializer
public static JSONSerializer createJSONSerializer()
deserialize
public static Object deserialize(JSONObject jsonObj)
deserialize
public static Object deserialize(String json)
getJSONFactory
public static JSONFactory getJSONFactory()
getNullJSON
public static String getNullJSON()
looseDeserialize
public static Object looseDeserialize(String json)
looseDeserialize
public static <T> T looseDeserialize(String json,
Class<T> clazz)
looseDeserializeSafe
public static Object looseDeserializeSafe(String json)
looseDeserializeSafe
public static <T> T looseDeserializeSafe(String json,
Class<T> clazz)
looseSerialize
public static String looseSerialize(Object object)
looseSerialize
public static String looseSerialize(Object object,
JSONTransformer jsonTransformer,
Class<?> clazz)
looseSerialize
public static String looseSerialize(Object object,
String... includes)
looseSerializeDeep
public static String looseSerializeDeep(Object object)
looseSerializeDeep
public static String looseSerializeDeep(Object object,
JSONTransformer jsonTransformer,
Class<?> clazz)
serialize
public static String serialize(Object object)
serializeException
public static String serializeException(Exception exception)
serializeThrowable
public static String serializeThrowable(Throwable throwable)
setJSONFactory
public void setJSONFactory(JSONFactory jsonFactory)