public class JSON extends Object
| 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 boolean |
isValid(String str) |
static boolean |
isValidArray(String str) |
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 str,
Feature... features) |
static <T> List<T> |
parseArray(String text,
Class<T> type) |
static JSONArray |
parseArray(String str,
Feature... features) |
static List<Object> |
parseArray(String text,
Type[] types) |
static <T> T |
parseObject(byte[] jsonBytes,
Type type,
Feature... features) |
static <T> T |
parseObject(char[] str,
Class type,
Feature... features) |
static JSONObject |
parseObject(String str) |
static <T> T |
parseObject(String text,
Class<T> clazz) |
static JSONObject |
parseObject(String text,
Feature... features) |
static <T> T |
parseObject(String str,
Type type,
Feature... features) |
static <T> T |
parseObject(String str,
TypeReference typeReference,
Feature... features) |
static <T> T |
toJavaObject(JSON json,
Class<T> clazz) |
static Object |
toJSON(Object javaObject) |
static 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 String |
toJSONString(Object object) |
static String |
toJSONString(Object object,
int defaultFeatures,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializeConfig config,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializeFilter... filters) |
static String |
toJSONString(Object object,
SerializeFilter[] filters,
SerializerFeature... features) |
static String |
toJSONString(Object object,
SerializerFeature... features) |
static String |
toJSONStringWithDateFormat(Object object,
String dateFormat,
SerializerFeature... features) |
static int |
writeJSONString(OutputStream os,
Object object,
int defaultFeatures,
SerializerFeature... features) |
static int |
writeJSONString(OutputStream os,
Object object,
SerializerFeature... features) |
public static final String VERSION
public static TimeZone defaultTimeZone
public static Locale defaultLocale
public static String DEFAULT_TYPE_KEY
public static String DEFFAULT_DATE_FORMAT
public static int DEFAULT_PARSER_FEATURE
public static int DEFAULT_GENERATE_FEATURE
public static JSONObject parseObject(String str)
public static JSONObject parseObject(String text, Feature... features)
public static <T> T parseObject(String str, TypeReference typeReference, Feature... features)
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 String toJSONString(Object object, SerializeFilter[] filters, SerializerFeature... features)
public static byte[] toJSONBytes(Object object, SerializeFilter[] filters, SerializerFeature... features)
public static String toJSONString(Object object, SerializeFilter... filters)
public static byte[] toJSONBytes(Object object, SerializeFilter... filters)
public static byte[] toJSONBytes(Object object)
public static String toJSONString(Object object, 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, int defaultFeatures, SerializerFeature... features)
public static String toJSONStringWithDateFormat(Object object, String dateFormat, SerializerFeature... features)
public static final int writeJSONString(OutputStream os, Object object, SerializerFeature... features) throws IOException
IOExceptionpublic static final int writeJSONString(OutputStream os, Object object, int defaultFeatures, SerializerFeature... features) throws IOException
IOExceptionpublic static boolean isValid(String str)
public static boolean isValidArray(String str)
Copyright © 2022 Alibaba Group. All rights reserved.