jonasbb / serde_with

This crate provides custom de/serialization helpers to use in combination with serde's `with`-annotation and with the improved `serde_as`-annotation.
https://docs.rs/serde_with
Apache License 2.0
636 stars 67 forks source link

Use without macros #753

Closed jbirnick closed 3 months ago

jbirnick commented 3 months ago

Hey, let 's say I have a hashmap : HashMap<i8,u32>, and I want to serialize this as a sequence of tuples (i8,u32). How can I do that without creating an extra struct and using an attribute macro like serde_as?

I just want to do that sort of in-place on the hashmap variable, I don't want the hashmap to be contained in a "parent struct".

Any help is very much appreciated!

jonasbb commented 3 months ago

Answered in #754