Package org.json.simple
Class JSONValue
- java.lang.Object
-
- org.json.simple.JSONValue
-
-
Constructor Summary
Constructors Constructor Description JSONValue()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.Stringescape(java.lang.String s)Deprecated.Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).static java.lang.Objectparse(java.io.Reader in)Deprecated.this method may throw anErrorinstead of returningnull; please useparseWithException(Reader)insteadstatic java.lang.Objectparse(java.lang.String s)Deprecated.this method may throw anErrorinstead of returningnull; please useparseWithException(String)insteadstatic java.lang.ObjectparseWithException(java.io.Reader in)Deprecated.Parse JSON text into java object from the input source.static java.lang.ObjectparseWithException(java.lang.String s)Deprecated.description omitted.static java.lang.StringtoJSONString(java.lang.Object value)Deprecated.Convert an object to JSON text.static voidwriteJSONString(java.lang.Object value, java.io.Writer out)Deprecated.Encode an object into JSON text and write it to out.
-
-
-
Constructor Detail
-
JSONValue
public JSONValue()
Deprecated.
-
-
Method Detail
-
parse
public static java.lang.Object parse(java.io.Reader in)
Deprecated.this method may throw anErrorinstead of returningnull; please useparseWithException(Reader)insteadParse JSON text into java object from the input source. Please use parseWithException() if you don't want to ignore the exception.- Parameters:
in- description omitted.- Returns:
- Instance of the following: org.json.simple.JSONObject, org.json.simple.JSONArray, java.lang.String, java.lang.Number, java.lang.Boolean, null
- See Also:
JSONParser.parse(Reader),parseWithException(Reader)
-
parse
public static java.lang.Object parse(java.lang.String s)
Deprecated.this method may throw anErrorinstead of returningnull; please useparseWithException(String)insteadParse JSON text into java object from the given string. Please use parseWithException() if you don't want to ignore the exception.- Parameters:
s- description omitted.- Returns:
- Instance of the following: org.json.simple.JSONObject, org.json.simple.JSONArray, java.lang.String, java.lang.Number, java.lang.Boolean, null
- See Also:
JSONParser.parse(Reader),parseWithException(Reader)
-
parseWithException
public static java.lang.Object parseWithException(java.io.Reader in) throws java.io.IOException, ParseException
Deprecated.Parse JSON text into java object from the input source.- Parameters:
in- description omitted.- Returns:
- Instance of the following: org.json.simple.JSONObject, org.json.simple.JSONArray, java.lang.String, java.lang.Number, java.lang.Boolean, null
- Throws:
java.io.IOException- description omitted.ParseException- description omitted.- See Also:
JSONParser
-
parseWithException
public static java.lang.Object parseWithException(java.lang.String s) throws ParseException
Deprecated.description omitted.- Parameters:
s- description omitted.- Returns:
- description omitted.
- Throws:
ParseException- description omitted.
-
writeJSONString
public static void writeJSONString(java.lang.Object value, java.io.Writer out) throws java.io.IOException
Deprecated.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.
- Parameters:
value- description omitted.out- description omitted.- Throws:
java.io.IOException- description omitted.- See Also:
JSONObject.writeJSONString(Map, Writer),JSONArray.writeJSONString(Collection, Writer)
-
toJSONString
public static java.lang.String toJSONString(java.lang.Object value)
Deprecated.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.
- Parameters:
value- description omitted.- Returns:
- JSON text, or "null" if value is null or it's an NaN or an INF number.
- See Also:
JSONObject.toJSONString(Map),JSONArray.toJSONString(Collection)
-
escape
public static java.lang.String escape(java.lang.String s)
Deprecated.Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).- Parameters:
s- description omitted.- Returns:
- description omitted.
-
-