/** * Reads the entire input stream from the specified reader and parses it as JSON value. The input stream is expected * to contain a valid JSON value with optional whitespace padding. * <p> * As characters are read in chunks and buffered internally it does <em>not</em> improve reading performance to wrap * an existing reader in a {@code BufferedReader}. * </p> * * @param reader the reader to read the JSON value from. * @return a JSON value which represents the read stream. * @throws NullPointerException if {@code reader} is {@code null}. * @throws JsonParseException if an I/O error occurred or if the input is no valid JSON. */ public static JsonValue readFrom(final Reader reader) { return JsonValueParser.fromReader().apply(reader); }