I'm new to this JsonPath library, and can't really tell from the documentation how to work with the results of read operations.
I don't need to convert results into pojos, but I would like to work with the results as jackson JsonNodes, for example.
Given something like this:
{
"bradies": [
{ "name": "bobby", "gender": "male" }
{ "name": "greg", "gender": "male" }
{ "name": "cindy", "gender": "female" }
{ "name": "marsha", "gender": "female" }
]
}
...I'd like to be able to do something like this:
Filter girlsOnly = filter( where("gender").is("female") );
List<JsonNode> bradyGirls = parseResults.read( "$.bradies", girlsOnly );
...but, accessing elements of the list above yields a ClassCastException.
Is it possible to get results from read() returned as jackson objects?