public static JsonPath compile(String path) {
JsonPathLexer lexer = new JsonPathLexer(CharStreams.fromString(path));
CommonTokenStream tokens = new CommonTokenStream(lexer);
JsonPathParser parser = new JsonPathParser(tokens);
parser.setErrorHandler(new BailErrorStrategy());
JsonPathParser.PathContext tree = parser.path();
JsonPathCompiler compiler = new JsonPathCompiler();
compiler.visit(tree);
return compiler.pathBuilder.build();
}
JsonPathCompiler.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:JsonSurfer
作者:
评论列表
文章目录