each_is_object

Function each_is_object 

Source
pub fn each_is_object() -> JsonPredicateMatcher<impl Fn(&Value) -> bool, String, &'static str>
Expand description

Matches JSON arrays whose elements are all JSON objects.

ยงExamples

assert_that!(j!([{ "a": 1 }, { "b": 2 }]), json::each_is_object());
assert_that!(j!([{ "a": 1 }, [1]]), not(json::each_is_object()));