revinate / assertj-json

A set of AssertJ assertions to validate JSON.
MIT License
26 stars 6 forks source link

Handle json path expression failures #1

Open jrglee opened 8 years ago

jrglee commented 8 years ago

Sometimes it is useful to validate when a jsonpath expression does not return anything, i.e.: validate if your serialized is ignoring entries with null value properly. The jsonpath library throws an exception when the path cannot evaluated, in this case the assertion utility can just wrap this exception and validate the path does not exist.