Is it possible to count the number of members using JsonPath?
Using spring mvc test I\'m testing a controller that generates
{\"foo\": \"oof\", \"ba
if you don't have com.jayway.jsonassert.JsonAssert
on your classpath (which was the case with me), testing in the following way may be a possible workaround:
assertEquals(expectedLength, ((net.minidev.json.JSONArray)parsedContent.read("$")).size());
[note: i assumed that the content of the json is always an array]