| Crates.io | does-it-json |
| lib.rs | does-it-json |
| version | 0.0.4 |
| created_at | 2022-06-24 19:15:25.319456+00 |
| updated_at | 2022-07-10 06:03:07.564677+00 |
| description | Compare serde serialization with the schemars JSON schema |
| homepage | |
| repository | https://github.com/ahl/does-it-json |
| max_upload_size | |
| id | 612567 |
| size | 37,505 |
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.