18 releases (stable)
Uses new Rust 2024
| 1.9.0 | Jan 11, 2026 |
|---|---|
| 1.8.1 | Dec 29, 2025 |
| 1.5.0 | Aug 26, 2025 |
| 1.0.0 | May 12, 2025 |
| 0.1.0 | Mar 29, 2025 |
#110 in Testing
116,152 downloads per month
Used in 52 crates
(2 directly)
330KB
9K
SLoC
This is still a work in progress. Come back later when more is done!
Declare your expectations in your Json:
use expect_json::expect;
server
.post(&"/user")
.await
.assert_json(&json!({
"name": "Joe",
"age": expect.in_range(20..=30),
"timestamp": expect::iso_date_time(),
"ids": expect.contains(&[1, 2, 3, 4]),
"comments": [
{
"timestamp": expect::iso_date_time().greater_than("2025-01-01"),
"content": "Hello!"
}
]
}));
Supports
expect.contains("a string")expect.contains([1, "2", 3.3, true, false, {}])
Dependencies
~4.5–6.5MB
~122K SLoC