Closed GoogleCodeExporter closed 9 years ago
Original comment by kalle.st...@gmail.com
on 8 Dec 2014 at 6:47
Your bracket notation is not correct. It should be:
String path = "$['store']['book'][?(@.price > 10)]['title']";
is same as:
String path = "$.store.book[?(@.price > 10)].title";
Original comment by kalle.st...@gmail.com
on 8 Dec 2014 at 8:02
Yes, sorry. I made a mistake with the bracket notation. But the issue I tried
to report was with the testDotNotation() test case. The path returned from the
compiled path is not the same we provide (and I do not mean exactly the same, I
mean that the returned path is not semantically the same). The output of these
statements:
String path = "$.store.book[?(@.price > 10)].title";
JsonPath jsonPath = JsonPath.compile(path);
System.out.println("testDotNotation: Compiled path returned: "+
jsonPath.getPath());
is
testDotNotation: Compiled path returned: $['store']['book'][?]['title']
The bracket notation returned is not the same, right?
Thanks a lot for the quick reply.
Original comment by emilio.r...@gmail.com
on 9 Dec 2014 at 2:56
Original issue reported on code.google.com by
emilio.r...@gmail.com
on 4 Dec 2014 at 6:58Attachments: