JSON { public static JsonObject read(String filename) { try (InputStream in = IO.openFileEx(filename)) { return JSON.parse(in) ; } catch (FileNotFoundException ex) { IO.exception("File not found: " + filename, ex) ; return null ; } catch (IOException ex) { IO.exception("IOException: " + filename, ex) ; return null ; } }  static JsonObject parse(InputStream input); static JsonObject parse(String string); static JsonValue parseAny(InputStream input); static JsonValue parseAny(String string); static JsonObject read(String filename); static JsonValue readAny(String filename); static String toString(JsonValue jValue); static String toStringFlat(JsonValue jValue); static void write(OutputStream output, JsonValue jValue); static void write(IndentedWriter output, JsonValue jValue); static void write(JsonValue jValue); static JsonValue copy(JsonValue arg); static JsonObject buildObject(Consumer<JsonBuilder> setup);  }
@Test public void js_value_1() { read("\"abc\"", new JsonString("abc")) ; }
@Test public void js_value_2() { read("123", JsonNumber.value(123)) ; }
@Test public void js_value_3() { read("true", new JsonBoolean(true)) ; }
@Test public void js_value_4() { read("{}", new JsonObject()) ; }
@Test public void js_value_5() { JsonObject obj = new JsonObject() ; obj.put("a", JsonNumber.value(123)) ; read("{ \"a\": 123 }", obj) ; }
@Test public void js_value_6() { JsonArray array = new JsonArray() ; read("[ ]", array) ; }
@Test public void js_value_7() { JsonArray array = new JsonArray() ; array.add(JsonNumber.value(123)) ; read("[ 123 ]", array) ; }
@Test public void js_value_8() { JsonObject obj = new JsonObject() ; JsonArray array = new JsonArray() ; array.add(JsonNumber.value(123)) ; obj.put("a", array) ; read("{ \"a\" : [ 123 ] }", obj) ; }
@Test public void js_value_13() { read("\"abc\\bd\"", new JsonString("abc\bd")) ; }