Package com.alibaba.fastjson
Class JSON
java.lang.Object
com.alibaba.fastjson.JSON
- Direct Known Subclasses:
JSONArray,JSONObject
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidstatic booleanstatic booleanisValidArray(String str) static Objectparse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, int features) static Objectparse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, Feature... features) static Objectstatic JSONArrayparseArray(String str, Feature... features) static <T> List<T>parseArray(String text, Class<T> type) parseArray(String text, Type[] types) static <T> TparseObject(byte[] input, int off, int len, CharsetDecoder charsetDecoder, Type clazz, Feature... features) static <T> TparseObject(byte[] jsonBytes, Type type, Feature... features) static <T> TparseObject(char[] str, Class type, Feature... features) static JSONObjectparseObject(String str) static JSONObjectparseObject(String text, Feature... features) static <T> TparseObject(String str, TypeReference typeReference, Feature... features) static <T> TparseObject(String text, Class<T> clazz) static <T> TparseObject(String str, Type type, Feature... features) static <T> TtoJavaObject(JSON json, Class<T> clazz) static Objectstatic byte[]toJSONBytes(Object object) static byte[]toJSONBytes(Object object, SerializeFilter... filters) static byte[]toJSONBytes(Object object, SerializeFilter[] filters, SerializerFeature... features) static byte[]toJSONBytes(Object object, SerializerFeature... features) static StringtoJSONString(Object object) static StringtoJSONString(Object object, int defaultFeatures, SerializerFeature... features) static StringtoJSONString(Object object, SerializeConfig config, SerializerFeature... features) static StringtoJSONString(Object object, SerializeFilter... filters) static StringtoJSONString(Object object, SerializeFilter[] filters, SerializerFeature... features) static StringtoJSONString(Object object, SerializerFeature... features) static StringtoJSONStringWithDateFormat(Object object, String dateFormat, SerializerFeature... features) static final intwriteJSONString(OutputStream os, Object object, SerializeFilter[] filters) static final intwriteJSONString(OutputStream os, Object object, SerializeFilter[] filters, SerializerFeature... features) static final intwriteJSONString(OutputStream os, Object object, SerializerFeature... features)
-
Field Details
-
VERSION
- See Also:
-
defaultTimeZone
-
defaultLocale
-
DEFAULT_TYPE_KEY
-
DEFFAULT_DATE_FORMAT
-
DEFAULT_PARSER_FEATURE
public static int DEFAULT_PARSER_FEATURE -
DEFAULT_GENERATE_FEATURE
public static int DEFAULT_GENERATE_FEATURE
-
-
Constructor Details
-
JSON
public JSON()
-
-
Method Details
-
parseObject
-
parseObject
-
parseObject
-
parseObject
-
parseObject
-
parseObject
-
parseObject
-
parse
-
config
-
parse
public static Object parse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, Feature... features) -
parse
public static Object parse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, int features) -
parseObject
public static <T> T parseObject(byte[] input, int off, int len, CharsetDecoder charsetDecoder, Type clazz, Feature... features) -
toJSONString
public static String toJSONString(Object object, SerializeFilter[] filters, SerializerFeature... features) -
toJSONBytes
public static byte[] toJSONBytes(Object object, SerializeFilter[] filters, SerializerFeature... features) -
toJSONString
-
toJSONString
-
toJSONString
-
toJSONBytes
-
toJSONBytes
-
toJSONBytes
-
toJSONString
public static String toJSONString(Object object, SerializeConfig config, SerializerFeature... features) -
toJSONString
public static String toJSONString(Object object, int defaultFeatures, SerializerFeature... features) -
toJSONStringWithDateFormat
public static String toJSONStringWithDateFormat(Object object, String dateFormat, SerializerFeature... features) -
writeJSONString
public static final int writeJSONString(OutputStream os, Object object, SerializerFeature... features) throws IOException - Throws:
IOException
-
writeJSONString
public static final int writeJSONString(OutputStream os, Object object, SerializeFilter[] filters) throws IOException - Throws:
IOException
-
writeJSONString
public static final int writeJSONString(OutputStream os, Object object, SerializeFilter[] filters, SerializerFeature... features) throws IOException - Throws:
IOException
-
parseArray
-
parseArray
-
isValid
-
isValidArray
-
toJavaObject
-
toJSON
-
parseArray
-