import javax.script.ScriptEngineManager;
public class Test {
public static void main(String[] args) throws Exception {
String str = "true && false";
Object eval = new ScriptEngineManager().getEngineByName("js").eval(str);
System.out.println(eval);
} }
var jsonStr='{"name":"CJ","age":18}';
var jsons1 = eval('(' + jsonStr + ')');
var jsons2 =(new Function("","return "+jsonStr))();