macro_rules! __json_each {
($inner:expr) => { ... };
}Expand description
Matches every element of a JSON array against a single matcher.
This allows writing expressive assertions such as:
use googletest::prelude::*;
use googletest_json_serde::json;
use serde_json::json as j;
assert_that!(j!([1, 2, 3]), json::each!(gt(0)));
assert_that!(j!(["ab", "ax"]), json::each!(starts_with("a")));Fails if:
- the value is not a JSON array
- any element fails the provided matcher
This behaves similarly to each() in googletest‑rust, but specialized for serde_json::Value.