Does jsonPath not count null?

I have json come back such as:

{“afield”:“awesome”, “optfield”:“here”},

I was trying to figure out how to count all the afield records.

To keep a long story short, I don’t think afield is being counted if it’s null.

jsonPath("$[*].afield") will never pass.

I guess I could just change it over to regex("""“afield” *: *"""")

Was just wondering if anyone else had run across this.


May I ask which version you’re using?



The issue is coming from the JsonPath library that we were using. We decide to write our own and now, with a recent Snapshot, it is working as expected.

Note that you can try your luck and upgrade Jayway’s JsonPath implementation, there’s been new versions since we released 2M3a and they could fix your issue.

It looks like upgrading to the snapshot fixed my issue with counting null fields.

Now to just get this jsonp thing figured out.