+ }
+
+ /**
+ * The method all JSON parsing must go through for JavaScript.
+ *
+ * @param r
+ * a BufferedReader or a javascript.json.JSON.JSONReader
+ * @return
+ * @throws IOException
+ * @throws ParseException
+ */
+ public static Object parse(Reader r) throws IOException, ParseException
+ {
+ return Platform.parseJSON(r);
+ }
+
+ public static Object parse(String json) throws ParseException
+ {
+ return Platform.parseJSON(json);
+ }
+
+ public static String stringify(Object obj)
+ {
+ return new org.json.JSONObject(obj).toString();