|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alibaba.dubbo.common.json.JSON
public class JSON
JSON.
Field Summary | |
---|---|
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
|
Method Summary | ||
---|---|---|
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
|
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
|
parse(String json,
Class<T> type)
parse json. |
|
static Object |
parse(String json,
JSONVisitor handler)
parse json. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Method Detail |
---|
public static String json(Object obj) throws IOException
obj
- object.
IOException.
IOException
public static void json(Object obj, Writer writer) throws IOException
obj
- object.writer
- writer.
IOException.
IOException
public static void json(Object obj, Writer writer, boolean writeClass) throws IOException
IOException
public static String json(Object obj, String[] properties) throws IOException
obj
- object.properties
- property name array.
IOException.
IOException
public static void json(Object obj, String[] properties, Writer writer) throws IOException
IOException
public static void json(Object obj, String[] properties, Writer writer, boolean writeClass) throws IOException
obj
- object.properties
- property name array.writer
- writer.
IOException.
IOException
public static Object parse(String json) throws ParseException
json
- json source.
ParseException
public static Object parse(Reader reader) throws IOException, ParseException
reader
- reader.
IOException
ParseException
public static <T> T parse(String json, Class<T> type) throws ParseException
json
- json string.type
- target type.
ParseException
public static <T> T parse(Reader reader, Class<T> type) throws IOException, ParseException
reader
- json source.type
- target type.
IOException
ParseException
public static Object[] parse(String json, Class<?>[] types) throws ParseException
json
- json string.types
- target type array.
ParseException
public static Object[] parse(Reader reader, Class<?>[] types) throws IOException, ParseException
reader
- json source.types
- target type array.
IOException
ParseException
public static Object parse(String json, JSONVisitor handler) throws ParseException
json
- json string.handler
- handler.
ParseException
public static Object parse(Reader reader, JSONVisitor handler) throws IOException, ParseException
reader
- json source.handler
- handler.
IOException
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |