java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.encoding.json.JSONValue |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
JSONValue() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String |
escape(String s)
Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).
| ||||||||||
static Object |
parse(Reader in)
This method is deprecated.
this method may throw an
Error instead of returning null ; please
use parseWithException(Reader) instead
| ||||||||||
static Object |
parse(String s)
This method is deprecated.
this method may throw an
Error instead of returning null ; please
use parseWithException(String) instead
| ||||||||||
static Object | parseWithException(String s) | ||||||||||
static Object |
parseWithException(Reader in)
Parse JSON text into java object from the input source.
| ||||||||||
static String |
toJSONString(Object value)
Convert an object to JSON text.
| ||||||||||
static void |
writeJSONString(Object value, Writer out)
Encode an object into JSON text and write it to out.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).
This method is deprecated.
this method may throw an Error
instead of returning null
; please
use parseWithException(Reader)
instead
Parse JSON text into java object from the input source. Please use parseWithException() if you don't want to ignore the exception.
This method is deprecated.
this method may throw an Error
instead of returning null
; please
use parseWithException(String)
instead
Parse JSON text into java object from the given string. Please use parseWithException() if you don't want to ignore the exception.
ParseException |
---|
Parse JSON text into java object from the input source.
IOException | |
ParseException | |
IOException |
Convert an object to JSON text.
If this object is a Map or a List, and it's also a JSONAware, JSONAware will be considered firstly.
DO NOT call this method from toJSONString() of a class that implements both JSONAware and Map or List with "this" as the parameter, use JSONObject.toJSONString(Map) or JSONArray.toJSONString(List) instead.
Encode an object into JSON text and write it to out.
If this object is a Map or a List, and it's also a JSONStreamAware or a JSONAware, JSONStreamAware or JSONAware will be considered firstly.
DO NOT call this method from writeJSONString(Writer) of a class that implements both JSONStreamAware and (Map or List) with "this" as the first parameter, use JSONObject.writeJSONString(Map, Writer) or JSONArray.writeJSONString(List, Writer) instead.
IOException |
---|