public abstract class JSON extends Object implements JSONStreamAware, JSONAware
| Modifier and Type | Field and Description |
|---|---|
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 |
| Constructor and Description |
|---|
JSON() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
parse(byte[] input,
Feature... features) |
static Object |
parse(String text) |
static Object |
parse(String text,
Feature... features) |
static Object |
parse(String text,
int features) |
static Object |
parse(String text,
ParserConfig config) |
static Object |
parse(String text,
ParserConfig config,
Feature... features) |
static Object |
parse(String text,
ParserConfig config,
int features) |
static JSONArray |
parseArray(String text) |
static <T> List<T> |
parseArray(String text,
Class<T> clazz) |
static JSONArray |
parseArray(String text,
Feature... features) |
static List<Object> |
parseArray(String text,
Type[] types) |
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)
Deprecated.
|
static Object |
toJSON(Object javaObject,
SerializeConfig config) |
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,
int defaultFeatures,
SerializerFeature... features) |
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 final 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 String VERSION
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 text, Class<T> clazz, ParseProcess processor, Feature... features)
public static final <T> T parseObject(String input, Type clazz, ParseProcess processor, 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 final <T> T parseObject(String input, Type clazz, ParserConfig config, ParseProcess processor, int featureValues, Feature... features)
public static final <T> T parseObject(char[] input,
int length,
Type clazz,
Feature... features)
public static Object parse(String text, ParserConfig config)
public static Object parse(String text, ParserConfig config, Feature... features)
public static Object parse(String text, ParserConfig config, int features)
public static final String toJSONString(Object object, SerializerFeature... features)
public static final String toJSONString(Object object, int defaultFeatures, 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 String toJSONString(Object object, SerializeFilter[] filters, 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 toJSONString(Object object, SerializeConfig config, SerializeFilter filter, SerializerFeature... features)
public static final String toJSONString(Object object, SerializeConfig config, SerializeFilter[] filters, 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 static final void writeJSONStringTo(Object object, Writer writer, SerializerFeature... features)
public String toJSONString()
toJSONString in interface JSONAwarepublic void writeJSONString(Appendable appendable)
JSONStreamAwarewriteJSONString in interface JSONStreamAware@Deprecated public static final Object toJSON(Object javaObject, ParserConfig mapping)
public static Object toJSON(Object javaObject, SerializeConfig config)
public <T> T toJavaObject(Class<T> clazz)
public static String toJSONString(Object object, SerializeConfig config, SerializeFilter[] filters, String dateFormat, int defaultFeatures, SerializerFeature... features)
Copyright © 2012–2017 Alibaba Group. All rights reserved.