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);
网友评论