Does jsonPath not count null?

I have json come back such as:

[
{“afield”:“awesome”, “optfield”:“here”},
{“afield”:null}
]

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").count.is(2) will never pass.

I guess I could just change it over to regex("""“afield” *: *"""").findAll.count.is(2)

Was just wondering if anyone else had run across this.

–Spencer

May I ask which version you’re using?

cheers
Nicolas

2.0.0-M3a

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.