JOSNP用JS引擎转MAP

    String jsFun = "function callback(json) {return json};";
    ScriptEngineManager engineManager = new ScriptEngineManager();
    ScriptEngine engine = engineManager.getEngineByMimeType("text/javascript");

    engine.eval(jsFun);
    Map json = (Map) engine.eval(unionid);  

你可能感兴趣的:(JOSNP用JS引擎转MAP)