Class JSONValue


  • public class JSONValue
    extends java.lang.Object
    Author:
    FangYidong<fangyidong@yahoo.com.cn>
    • Constructor Summary

      Constructors 
      Constructor Description
      JSONValue()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method 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 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.io.Writer out)
      Encode an object into JSON text and write it to out.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JSONValue

        public JSONValue()
    • Method Detail

      • escape

        public 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).
      • parseWithException

        public static java.lang.Object parseWithException​(java.io.Reader in)
                                                   throws java.io.IOException,
                                                          ParseException
        Parse JSON text into java object from the input source.
        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
        ParseException
      • parseWithException

        public static java.lang.Object parseWithException​(java.lang.String s)
                                                   throws ParseException
        Throws:
        ParseException