Closed trungsi closed 6 years ago
There is a limitation. No more path after the filter clause. The working path has to be:
$.policy.policy-details.parties.party[?(@.role == 'role1')]
README updated
Thanks.
Any plan to provide full support for jsonpath ?
No plan yet. However, any contribution are welcomed.
Hello
I have a json structure like this
{ "policy" : { "policy-details" : { "parties" : { "party" : [{"role" : "role1", "name" : "name1"}, {"role" : "role2", "name" : "name2"}]}} } }
With this jsonPath $.policy.policy-details.parties.party[?(@.role == 'role1')].name I got org.antlr.v4.runtime.misc.ParseCancellationException at org.antlr.v4.runtime.BailErrorStrategy.recoverInline(BailErrorStrategy.java:66) at org.antlr.v4.runtime.Parser.match(Parser.java:206) at org.jsfr.json.compiler.JsonPathParser.path(JsonPathParser.java:154) at org.jsfr.json.compiler.JsonPathCompiler.compile(JsonPathCompiler.java:238) at org.jsfr.json.SurfingConfiguration$Builder.bind(SurfingConfiguration.java:148)But the path is working while testing on http://jsonpath.com/.
Is it a bug or not supported ?
Thanks