/** * Reads a Hjson value from the given string. * * @param text the string that contains the Hjson value * @return the Hjson value that has been read * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(String text) { try { return new HjsonParser(text, null).parse(); } catch(IOException exception) { // JsonParser does not throw IOException for String throw new RuntimeException(exception); } }
/** * Reads a Hjson value from the given reader. * <p> * Characters are read in chunks and buffered internally, therefore wrapping an existing reader in * an additional <code>BufferedReader</code> does <strong>not</strong> improve reading * performance. * </p> * * @param reader the reader to read the Hjson value from * @return the Hjson value that has been read * @throws IOException if an I/O error occurs in the reader * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(Reader reader) throws IOException { return new HjsonParser(reader, null).parse(); }
/** * Reads a Hjson value from the given string. * * @param text the string that contains the Hjson value * @return the Hjson value that has been read * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(String text) { try { return new HjsonParser(text, null).parse(); } catch(IOException exception) { // JsonParser does not throw IOException for String throw new RuntimeException(exception); } }
/** * Reads a Hjson value from the given string. * * @param text the string that contains the Hjson value * @param options the Hjson options * @return the Hjson value that has been read * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(String text, HjsonOptions options) { try { return new HjsonParser(text, options).parse(); } catch(IOException exception) { // JsonParser does not throw IOException for String throw new RuntimeException(exception); } } /**
/** * Reads a Hjson value from the given reader. * <p> * Characters are read in chunks and buffered internally, therefore wrapping an existing reader in * an additional <code>BufferedReader</code> does <strong>not</strong> improve reading * performance. * </p> * * @param reader the reader to read the Hjson value from * @param options the Hjson options * @return the Hjson value that has been read * @throws IOException if an I/O error occurs in the reader * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(Reader reader, HjsonOptions options) throws IOException { return new HjsonParser(reader, options).parse(); }
/** * Reads a Hjson value from the given string. * * @param text the string that contains the Hjson value * @param options the Hjson options * @return the Hjson value that has been read * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(String text, HjsonOptions options) { try { return new HjsonParser(text, options).parse(); } catch(IOException exception) { // JsonParser does not throw IOException for String throw new RuntimeException(exception); } } /**
/** * Reads a Hjson value from the given reader. * <p> * Characters are read in chunks and buffered internally, therefore wrapping an existing reader in * an additional <code>BufferedReader</code> does <strong>not</strong> improve reading * performance. * </p> * * @param reader the reader to read the Hjson value from * @return the Hjson value that has been read * @throws IOException if an I/O error occurs in the reader * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(Reader reader) throws IOException { return new HjsonParser(reader, null).parse(); }
/** * Reads a Hjson value from the given reader. * <p> * Characters are read in chunks and buffered internally, therefore wrapping an existing reader in * an additional <code>BufferedReader</code> does <strong>not</strong> improve reading * performance. * </p> * * @param reader the reader to read the Hjson value from * @param options the Hjson options * @return the Hjson value that has been read * @throws IOException if an I/O error occurs in the reader * @throws ParseException if the input is not valid Hjson */ public static JsonValue readHjson(Reader reader, HjsonOptions options) throws IOException { return new HjsonParser(reader, options).parse(); }