Open UnlimitedCookies opened 2 weeks ago
I also came to say this, what are the odds lol
Hey, thanks for the suggestion. I would love to see some better serde derives, but I can't maintain that. The implementation of serde_tuple
seems relatively simple, but it requires serde_derive
to perform the heavy lifting. This does restrict its design too, so support for enums might be some effort.
My use case would be to remap a struct like Vec3
to a tuple struct using something like "(x, y, z)"
where the letters are the fields of the struct
The crate serde_tuple seems to be abandoned and I think its functionality would be a good fit for this crate.
Basically it omits the field names when (de)serializing a struct and just outputs a tuple (in JSON also a list) with the values, making them dependent on the order when de-serializing the the struct.
The serde_tuple crate is also missing functionality like (de)serializing an enum with struct fields into a tuple (where the first entry is the enum variant identifier), so it would be awesome if this crate could accomplish that as well.