@Deprecated public class JSON extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static byte |
ARRAY_ITEM
已过时。
|
static char |
COLON
已过时。
|
static char |
COMMA
已过时。
|
static byte |
END
已过时。
|
static char |
LBRACE
已过时。
|
static char |
LSQUARE
已过时。
|
static String |
NULL
已过时。
|
static byte |
OBJECT_ITEM
已过时。
|
static byte |
OBJECT_VALUE
已过时。
|
static char |
QUOTE
已过时。
|
static char |
RBRACE
已过时。
|
static char |
RSQUARE
已过时。
|
static byte |
START
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
json(Object obj)
已过时。
json string.
|
static String |
json(Object obj,
String[] properties)
已过时。
json string.
|
static void |
json(Object obj,
String[] properties,
Writer writer)
已过时。
|
static void |
json(Object obj,
String[] properties,
Writer writer,
boolean writeClass)
已过时。
write json.
|
static void |
json(Object obj,
Writer writer)
已过时。
write json.
|
static void |
json(Object obj,
Writer writer,
boolean writeClass)
已过时。
|
static Object |
parse(Reader reader)
已过时。
parse json.
|
static Object[] |
parse(Reader reader,
Class<?>[] types)
已过时。
parse json.
|
static <T> T |
parse(Reader reader,
Class<T> type)
已过时。
parse json
|
static Object |
parse(Reader reader,
JSONVisitor handler)
已过时。
parse json.
|
static Object |
parse(String json)
已过时。
parse json.
|
static Object[] |
parse(String json,
Class<?>[] types)
已过时。
parse json.
|
static <T> T |
parse(String json,
Class<T> type)
已过时。
parse json.
|
static Object |
parse(String json,
JSONVisitor handler)
已过时。
parse json.
|
public static final char LBRACE
public static final char RBRACE
public static final char LSQUARE
public static final char RSQUARE
public static final char COMMA
public static final char COLON
public static final char QUOTE
public static final byte END
public static final byte START
public static final byte OBJECT_ITEM
public static final byte OBJECT_VALUE
public static final byte ARRAY_ITEM
public static String json(Object obj) throws IOException
obj - object.IOExceptionpublic static void json(Object obj, Writer writer) throws IOException
obj - object.writer - writer.IOExceptionpublic static void json(Object obj, Writer writer, boolean writeClass) throws IOException
IOExceptionpublic static String json(Object obj, String[] properties) throws IOException
obj - object.properties - property name array.IOExceptionpublic static void json(Object obj, String[] properties, Writer writer) throws IOException
IOExceptionpublic static void json(Object obj, String[] properties, Writer writer, boolean writeClass) throws IOException
obj - object.properties - property name array.writer - writer.IOExceptionpublic static Object parse(String json) throws ParseException
json - json source.ParseExceptionpublic static Object parse(Reader reader) throws IOException, ParseException
reader - reader.IOExceptionParseExceptionpublic static <T> T parse(String json, Class<T> type) throws ParseException
json - json string.type - target type.ParseExceptionpublic static <T> T parse(Reader reader, Class<T> type) throws IOException, ParseException
reader - json source.type - target type.IOExceptionParseExceptionpublic static Object[] parse(String json, Class<?>[] types) throws ParseException
json - json string.types - target type array.ParseExceptionpublic static Object[] parse(Reader reader, Class<?>[] types) throws IOException, ParseException
reader - json source.types - target type array.IOExceptionParseExceptionpublic static Object parse(String json, JSONVisitor handler) throws ParseException
json - json string.handler - handler.ParseExceptionpublic static Object parse(Reader reader, JSONVisitor handler) throws IOException, ParseException
reader - json source.handler - handler.IOExceptionParseExceptionCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.