Commit c0452aa
committed
Make JDT path resolution pluggable for compiled JsonPath support
Thread a pathResolver function through the JDT engine so callers can
plug in bytecode-compiled JsonPath queries instead of the interpreter.
The new overload Jdt.transform(source, transform, pathResolver) accepts
a Function<String, Function<JsonValue, List<JsonValue>>> that compiles
a JsonPath expression into a query function.
Default behavior unchanged: uses JsonPath.parse(expr)::query.
Example with compiled JsonPath:
Jdt.transform(source, transform, expr -> JsonPathCodegen.compile(expr)::query);
All 33 existing tests pass unchanged.
To verify: mvn test -pl json-java21-jdt -am1 parent 8f8f5a3 commit c0452aa
1 file changed
+79
-86
lines changed
0 commit comments