#can macro that takes json and deserializes it into struct without deserialize trait
9 messages · Page 1 of 1 (latest)
you can't implement a trait that isn't defined in your crate to a type that isn't defined in your crate. you can't avoid the wrappers.
if it makes sense to use these types with serde, you can try to add a derive of serde under a special feature to the crate in question, and open a PR,
i don't think it that needed for others so it wouldn't be considered
so if that's out of question then maybe there's some tool for auto generating wrappers?
not that I know of, but how trivial is it in your case? are the types public and you have access to all the fields?
i think so
Maybe this features helps you: https://serde.rs/remote-derive.html
well this still requires me to create dummy structs but at least it's a bit better