greyblake/whatlang-rs

`serde` support

aumetra opened this issue · 1 comments

Would simple serde support be in scope?
Something like a simple #[derive(Deserialize, Serialize)] on Lang?

Rationale: I have structs containing a Lang and I would like to cache them in Redis which requires de-/serializing the structure.

Or should I just roll my own serialize_with and deserialize_with functions that work via the ISO codes?


If so, I'd be happy to contribute a PR. We can also go for a custom serde implementation that works via the ISO codes, to keep some universally agreed upon format.

Thanks for your request.
I've added support for serde in #135
I just published a new version 0.16.3 so you can use it.

Have a great day!