public JsonValue parse ( Reader reader , int buffersize ) throws IOException { if ( reader == null ) { throw new NullPointerException ( "reader is null" ) ; } if ( buffersize <= 0 ) { throw new IllegalArgumentException ( "buffersize is zero or negative" ) ; } this . reader = reader ; buffer = new char [ buffersize ] ; bufferOffset = 0 ; index = 0 ; fill = 0 ; line = 1 ; lineOffset = 0 ; current = 0 ; captureStart = - 1 ; read ( ) ; return readValue ( ) ; }
Reads a single value from the given reader and parses it as JsonValue . The input must be pointing to the beginning of a JsonLiteral not JsonArray or JsonObject .