use jstrict::Print;
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
struct MyType {
foo: String,
bar: Vec<u32>,
}
fn main() {
let a = MyType {
foo: "Hello World!".to_string(),
bar: vec![1, 2, 3],
};
let json = jstrict::to_value(&a).expect("serialization failed");
println!("{}", json.pretty_print());
let b: MyType = jstrict::from_value(json).expect("deserialization failed");
assert_eq!(a, b)
}