public abstract class JSON extends Object implements JSONStreamAware, JSONAware
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_GENERATE_FEATURE |
static int |
DEFAULT_PARSER_FEATURE |
static String |
DEFAULT_TYPE_KEY |
static Locale |
defaultLocale |
static TimeZone |
defaultTimeZone |
static String |
DEFFAULT_DATE_FORMAT |
static String |
VERSION |
构造器和说明 |
---|
JSON() |
限定符和类型 | 方法和说明 |
---|---|
static Object |
parse(byte[] input,
Feature... features) |
static Object |
parse(byte[] input,
int off,
int len,
CharsetDecoder charsetDecoder,
Feature... features) |
static Object |
parse(byte[] input,
int off,
int len,
CharsetDecoder charsetDecoder,
int features) |
static Object |
parse(String text) |
static Object |
parse(String text,
Feature... features) |
static Object |
parse(String text,
int features) |
static JSONArray |
parseArray(String text) |
static <T> List<T> |
parseArray(String text,
Class<T> clazz) |
static List<Object> |
parseArray(String text,
Type[] types) |
static <T> T |
parseObject(byte[] input,
int off,
int len,
CharsetDecoder charsetDecoder,
Type clazz,
Feature... features) |
static <T> T |
parseObject(byte[] input,
Type clazz,
Feature... features) |
static <T> T |
parseObject(char[] input,
int length,
Type clazz,
Feature... features) |
static JSONObject |
parseObject(String text) |
static <T> T |
parseObject(String text,
Class<T> clazz) |
static <T> T |
parseObject(String text,
Class<T> clazz,
Feature... features) |
static <T> T |
parseObject(String text,
Class<T> clazz,
ParseProcess processor,
Feature... features) |
static JSONObject |
parseObject(String text,
Feature... features) |
static <T> T |
parseObject(String input,
Type clazz,
Feature... features) |
static <T> T |
parseObject(String input,
Type clazz,
int featureValues,
Feature... features) |
static <T> T |
parseObject(String input,
Type clazz,
ParseProcess processor,
Feature... features) |
static <T> T |
parseObject(String input,
Type clazz,
ParserConfig config,
int featureValues,
Feature... features) |
static <T> T |
parseObject(String input,
Type clazz,
ParserConfig config,
ParseProcess processor,
int featureValues,
Feature... features) |
static <T> T |
parseObject(String text,
TypeReference<T> type,
Feature... features) |
<T> T |
toJavaObject(Class<T> clazz) |
static <T> T |
toJavaObject(JSON json,
Class<T> clazz) |
static Object |
toJSON(Object javaObject) |
static Object |
toJSON(Object javaObject,
ParserConfig mapping) |
static byte[] |
toJSONBytes(Object object,
SerializeConfig config,
SerializerFeature... features) |
static byte[] |
toJSONBytes(Object object,
SerializerFeature... features) |
String |
toJSONString() |
static String |
toJSONString(Object object) |
static String |
toJSONString(Object object,
boolean prettyFormat) |
static String |
toJSONString(Object object,
SerializeConfig config,
SerializeFilter[] filters,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializeConfig config,
SerializeFilter[] filters,
String dateFormat,
int defaultFeatures,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializeConfig config,
SerializeFilter filter,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializeConfig config,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializeFilter[] filters,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializeFilter filter,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializerFeature... features) |
static String |
toJSONStringWithDateFormat(Object object,
String dateFormat,
SerializerFeature... features) |
static String |
toJSONStringZ(Object object,
SerializeConfig mapping,
SerializerFeature... features) |
String |
toString() |
void |
writeJSONString(Appendable appendable)
write JSON string to out.
|
static void |
writeJSONStringTo(Object object,
Writer writer,
SerializerFeature... features) |
public static TimeZone defaultTimeZone
public static Locale defaultLocale
public static String DEFAULT_TYPE_KEY
public static int DEFAULT_PARSER_FEATURE
public static String DEFFAULT_DATE_FORMAT
public static int DEFAULT_GENERATE_FEATURE
public static Object parse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, Feature... features)
public static Object parse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, int features)
public static JSONObject parseObject(String text, Feature... features)
public static JSONObject parseObject(String text)
public static <T> T parseObject(String text, TypeReference<T> type, Feature... features)
public static <T> T parseObject(String text, Class<T> clazz, ParseProcess processor, Feature... features)
public static <T> T parseObject(String input, Type clazz, ParseProcess processor, Feature... features)
public static <T> T parseObject(String input, Type clazz, int featureValues, Feature... features)
public static <T> T parseObject(String input, Type clazz, ParserConfig config, int featureValues, Feature... features)
public static <T> T parseObject(String input, Type clazz, ParserConfig config, ParseProcess processor, int featureValues, Feature... features)
public static <T> T parseObject(byte[] input, int off, int len, CharsetDecoder charsetDecoder, Type clazz, Feature... features)
public static <T> T parseObject(char[] input, int length, Type clazz, Feature... features)
public static String toJSONString(Object object, SerializerFeature... features)
public static String toJSONStringWithDateFormat(Object object, String dateFormat, SerializerFeature... features)
public static String toJSONString(Object object, SerializeFilter filter, SerializerFeature... features)
public static String toJSONString(Object object, SerializeFilter[] filters, SerializerFeature... features)
public static byte[] toJSONBytes(Object object, SerializerFeature... features)
public static String toJSONString(Object object, SerializeConfig config, SerializerFeature... features)
public static String toJSONString(Object object, SerializeConfig config, SerializeFilter filter, SerializerFeature... features)
public static String toJSONString(Object object, SerializeConfig config, SerializeFilter[] filters, SerializerFeature... features)
public static String toJSONString(Object object, SerializeConfig config, SerializeFilter[] filters, String dateFormat, int defaultFeatures, SerializerFeature... features)
public static String toJSONStringZ(Object object, SerializeConfig mapping, SerializerFeature... features)
public static byte[] toJSONBytes(Object object, SerializeConfig config, SerializerFeature... features)
public static void writeJSONStringTo(Object object, Writer writer, SerializerFeature... features)
public String toJSONString()
toJSONString
在接口中 JSONAware
public void writeJSONString(Appendable appendable)
JSONStreamAware
writeJSONString
在接口中 JSONStreamAware
public static Object toJSON(Object javaObject, ParserConfig mapping)
public <T> T toJavaObject(Class<T> clazz)
Copyright © 2012–2016 Alibaba Group. All rights reserved.