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 String |
DEFFAULT_DATE_FORMAT |
| Constructor and Description |
|---|
JSON() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createJavaBean(String jsonString) |
static String |
createJavaBean(String className,
String jsonString) |
static String |
createJavaBean(String saveFilePath,
String className,
String jsonString) |
static String |
createJavaBean(URL url) |
static String |
createJavaBean(URL url,
String className) |
static String |
createJavaBean(URL url,
String className,
String saveFilePath) |
static void |
handleResovleTask(DefaultJSONParser parser,
Object 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 <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) |
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) |
static void |
writeJSONStringTo(Object object,
Writer writer,
SerializerFeature... features) |
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 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 void handleResovleTask(DefaultJSONParser parser, Object 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 static final void writeJSONStringTo(Object object, Writer writer, SerializerFeature... features)
public String toJSONString()
toJSONString in interface JSONAwarepublic void writeJSONString(Appendable appendable)
writeJSONString in interface JSONStreamAwarepublic static final Object toJSON(Object javaObject, ParserConfig mapping)
public static final String createJavaBean(URL url, String className, String saveFilePath)
public static final String createJavaBean(String saveFilePath, String className, String jsonString)
public static final void createJavaBean(String jsonString)
Copyright © 2016 jufeng. All rights reserved.