public class JSONValue
extends java.lang.Object
Constructor and Description |
---|
JSONValue() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escape(java.lang.String s)
Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters
(U+0000 through U+001F).
|
static void |
escape(java.lang.String s,
java.lang.Appendable ap) |
static java.lang.Object |
parse(java.io.Reader in)
Parse JSON text into java object from the input source.
|
static java.lang.Object |
parse(java.lang.String s) |
static java.lang.Object |
parseWithException(java.io.Reader in)
Parse JSON text into java object from the input source.
|
static java.lang.Object |
parseWithException(java.lang.String s) |
static java.lang.String |
toJSONString(java.lang.Object value)
Convert an object to JSON text.
|
static void |
writeJSONString(java.lang.Object value,
java.lang.Appendable out)
Encode an object into JSON text and write it to out.
|
public static java.lang.Object parse(java.io.Reader in)
JSONParserStream.parse(Reader)
,
parseWithException(Reader)
public static java.lang.Object parse(java.lang.String s)
public static java.lang.Object parseWithException(java.io.Reader in) throws java.io.IOException, ParseException
java.io.IOException
ParseException
JSONParser
public static java.lang.Object parseWithException(java.lang.String s) throws ParseException
ParseException
public static void writeJSONString(java.lang.Object value, java.lang.Appendable out) throws java.io.IOException
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.
java.io.IOException
JSONObject.writeJSONString(Map, Appendable)
,
JSONArray.writeJSONString(List, Appendable)
public static java.lang.String toJSONString(java.lang.Object value)
If this object is a Map or a List, and it's also a JSONAware, JSONAware will be considered firstly.
JSONObject.toJSONString(Map)
,
JSONArray.toJSONString(List)
public static java.lang.String escape(java.lang.String s)
public static void escape(java.lang.String s, java.lang.Appendable ap)
Copyright © 2019 Potix Corporation. All rights reserved.