Skip to content

ahl/does-it-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rust serde/schemars validator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages