Macro json_compatible

Source
macro_rules! json_compatible {
    ($a:ident $(:: $a_sub:ident)* with $b:ident $(:: $b_sub:ident)*) => { ... };
}
Expand description

Defines one type as JSON compatible with another.

json_compatible!(objects_v28::DatabaseKey with objects_v27::DatabaseKey);

Internally this will implement JsonCompatible<B> for <A>, e.g. JsonCompatible<objects_v27::DatabaseKey> for objects_v28::DatabaseKey and generate proptest cases that will create arbitrary objects of type B and assert they can be deserialized with type A, and vice versa.