us.monoid.web
Class JSONPathQuery
java.lang.Object
us.monoid.web.PathQuery<JSONResource,Object>
us.monoid.web.JSONPathQuery
public class JSONPathQuery
- extends PathQuery<JSONResource,Object>
Create a path query for a JSON object. Usualy this is done by calling Resty.path(...)
A JSONPathQuery is similar to JsonPath or XPath in that you can create access paths into an JSON object.
It uses dot '.' as a path separator and [] to access arrays.
The array index is either a number or an expression to evaluate for each object in the array. The first matching object is returned.
I.e.
store.book[price>7 && price<12.999].author
In the example above the JSON object with a prive value between 7 and 12.999 is selected and the author returned.
Boolean expressions are supported with && (and), || (or), ! (not). Values can be compared with =,<,>.
- Author:
- beders
JSONPathQuery
public JSONPathQuery(String anExpression)
Copyright © 2013. All Rights Reserved.