@Deprecated public class JSON extends Object
| Modifier and Type | Field and Description |
|---|---|
static byte |
ARRAY_ITEM
Deprecated.
|
static char |
COLON
Deprecated.
|
static char |
COMMA
Deprecated.
|
static byte |
END
Deprecated.
|
static char |
LBRACE
Deprecated.
|
static char |
LSQUARE
Deprecated.
|
static String |
NULL
Deprecated.
|
static byte |
OBJECT_ITEM
Deprecated.
|
static byte |
OBJECT_VALUE
Deprecated.
|
static char |
QUOTE
Deprecated.
|
static char |
RBRACE
Deprecated.
|
static char |
RSQUARE
Deprecated.
|
static byte |
START
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
json(Object obj)
Deprecated.
json string.
|
static String |
json(Object obj,
String[] properties)
Deprecated.
json string.
|
static void |
json(Object obj,
String[] properties,
Writer writer)
Deprecated.
|
static void |
json(Object obj,
String[] properties,
Writer writer,
boolean writeClass)
Deprecated.
write json.
|
static void |
json(Object obj,
Writer writer)
Deprecated.
write json.
|
static void |
json(Object obj,
Writer writer,
boolean writeClass)
Deprecated.
|
static Object |
parse(Reader reader)
Deprecated.
parse json.
|
static Object[] |
parse(Reader reader,
Class<?>[] types)
Deprecated.
parse json.
|
static <T> T |
parse(Reader reader,
Class<T> type)
Deprecated.
parse json
|
static Object |
parse(Reader reader,
JSONVisitor handler)
Deprecated.
parse json.
|
static Object |
parse(String json)
Deprecated.
parse json.
|
static Object[] |
parse(String json,
Class<?>[] types)
Deprecated.
parse json.
|
static <T> T |
parse(String json,
Class<T> type)
Deprecated.
parse json.
|
static Object |
parse(String json,
JSONVisitor handler)
Deprecated.
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 String NULL
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–2018 The Dubbo Project. All rights reserved.