4 releases
0.0.4 | Jul 10, 2022 |
---|---|
0.0.3 | Jun 27, 2022 |
0.0.2 | Jun 24, 2022 |
0.0.1 | Jun 24, 2022 |
#25 in #serialize
24 downloads per month
Used in ipnetwork
25KB
606 lines
Does it JSON?
Simple crate to validate that a type's serialization via serde
matches the
JSON schema from schemars
.
This is particularly useful when hand-rolling (rather than deriving)
serde::Serialize
and/or schemars::JsonSchema
--it can be easy to
accidentally have divergence between the two.
let item = MyType::create_somehow();
does_it_json::validate(&item).unwrap();
For best results, apply to a variety of instantiations of your type.
Dependencies
~2.1–3MB
~76K SLoC