public static Object parse(String json) { JSONParser parser = new JSONParser(new StringReader(json)); try { return parser.parse(); } catch (ParseException e) { throw new AssertionError(e); } // try { // Bindings bindings = new SimpleBindings(); // String eval = "var tmp = (" + json + ");var o = new java.util.concurrent.atomic.AtomicReference(tmp.toJava());"; // engine.eval(eval, bindings); // AtomicReference ret = (AtomicReference)bindings.get("o"); // return ret.get(); // } // catch (ScriptException e) { // throw new AssertionError(e); // } } }
public static Object parse(String json) { JSONParser parser = new JSONParser(new StringReader(json)); try { return parser.parse(); } catch (ParseException e) { throw new AssertionError(e); } // try { // Bindings bindings = new SimpleBindings(); // String eval = "var tmp = (" + json + ");var o = new java.util.concurrent.atomic.AtomicReference(tmp.toJava());"; // engine.eval(eval, bindings); // AtomicReference ret = (AtomicReference)bindings.get("o"); // return ret.get(); // } // catch (ScriptException e) { // throw new AssertionError(e); // } } }