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 String |
DEFFAULT_DATE_FORMAT |
static String |
VERSION |
| 构造器和说明 |
|---|
JSON() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> int |
handleResovleTask(DefaultJSONParser parser,
T value) |
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 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,
ParserConfig config,
int featureValues,
Feature... features) |
static <T> T |
parseObject(String text,
TypeReference<T> type,
Feature... features) |
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,
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.
|
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 final Object parse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, Feature... features)
public static final Object parse(byte[] input, int off, int len, CharsetDecoder charsetDecoder, int features)
public static final JSONObject parseObject(String text, Feature... features)
public static final JSONObject parseObject(String text)
public static final <T> T parseObject(String text, TypeReference<T> type, Feature... features)
public static final <T> T parseObject(String input, Type clazz, int featureValues, Feature... features)
public static final <T> T parseObject(String input, Type clazz, ParserConfig config, int featureValues, Feature... features)
public static <T> int handleResovleTask(DefaultJSONParser parser, T value)
public static final <T> T parseObject(byte[] input,
int off,
int len,
CharsetDecoder charsetDecoder,
Type clazz,
Feature... features)
public static final <T> T parseObject(char[] input,
int length,
Type clazz,
Feature... features)
public static final String toJSONString(Object object, SerializerFeature... features)
public static final String toJSONStringWithDateFormat(Object object, String dateFormat, SerializerFeature... features)
public static final String toJSONString(Object object, SerializeFilter filter, SerializerFeature... features)
public static final byte[] toJSONBytes(Object object, SerializerFeature... features)
public static final String toJSONString(Object object, SerializeConfig config, SerializerFeature... features)
public static final String toJSONStringZ(Object object, SerializeConfig mapping, SerializerFeature... features)
public static final byte[] toJSONBytes(Object object, SerializeConfig config, SerializerFeature... features)
public String toJSONString()
toJSONString 在接口中 JSONAwarepublic void writeJSONString(Appendable appendable)
JSONStreamAwarewriteJSONString 在接口中 JSONStreamAwarepublic static final Object toJSON(Object javaObject, ParserConfig mapping)
Copyright © 2012-2013 Alibaba Group. All Rights Reserved.