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