I am working on a Rust program that uses serde-json, and I really like the #[derive(Serialize, Deserialize)]
macros that it gives for use with custom structs and enums. The macros work just fine with my own types. However, I would like to be able to call the macros on types from other libraries that I am using.
I would implement the Serialize
and Deserialize
traits on those types myself, but the code for Deserialize
is especially convoluted, and it would be a pain to write to for every single library type that I use in a struct.