001
014
015 package com.liferay.portal.kernel.json;
016
017 import java.util.List;
018
019
022 public interface JSONFactory {
023
024 public String convertJSONMLArrayToXML(String jsonml);
025
026 public String convertJSONMLObjectToXML(String jsonml);
027
028 public String convertXMLtoJSONMLArray(String xml);
029
030 public String convertXMLtoJSONMLObject(String xml);
031
032 public JSONTransformer createJavaScriptNormalizerJSONTransformer(
033 List<String> javaScriptAttributes);
034
035 public JSONArray createJSONArray();
036
037 public JSONArray createJSONArray(String json) throws JSONException;
038
039 public <T> JSONDeserializer<T> createJSONDeserializer();
040
041 public JSONObject createJSONObject();
042
043 public JSONObject createJSONObject(String json) throws JSONException;
044
045 public JSONSerializer createJSONSerializer();
046
047 public Object deserialize(JSONObject jsonObj);
048
049 public Object deserialize(String json);
050
051 public String getNullJSON();
052
053 public JSONObject getUnmodifiableJSONObject();
054
055 public Object looseDeserialize(String json);
056
057 public <T> T looseDeserialize(String json, Class<T> clazz);
058
059 public Object looseDeserializeSafe(String json);
060
061 public <T> T looseDeserializeSafe(String json, Class<T> clazz);
062
063 public String looseSerialize(Object object);
064
065 public String looseSerialize(
066 Object object, JSONTransformer jsonTransformer, Class<?> clazz);
067
068 public String looseSerialize(Object object, String... includes);
069
070 public String looseSerializeDeep(Object object);
071
072 public String looseSerializeDeep(
073 Object object, JSONTransformer jsonTransformer, Class<?> clazz);
074
075 public String serialize(Object object);
076
077 public String serializeException(Exception exception);
078
079 public String serializeThrowable(Throwable throwable);
080
081 }