You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, currently struggling with deserializing just serialized structs again. Sadly not getting much info for why, just getting an Serde Deserialization Error.
This is the implementation of my test: https://github.com/XBagon/gears/blob/egg/gears_core/src/gear_file.rs#L84
I feel like my struct isn't that complicated and I haven't done any manual Ser/De implemenations, so I'm struggling to even find a start where to debug :P.
Probably a whole test suite of just serializing and directly deserializing some example structs - maybe some of popular structs to catch stuff like #77 - would make sense for a crate like this?
The text was updated successfully, but these errors were encountered:
djkoloski
added a commit
to djkoloski/serde
that referenced
this issue
Oct 7, 2022
On enums with a skipped variant that is not the last one, the generated
serialization and deserialization code map the variants of the enum to
different variant indices. In `deserialize_identifier`, the variant
index starts at 0 and counts up once per non-skipped variant. However,
for serialization the index is always the index of the variant within
the enum.
This PR corrects the deserialization code to always use the index of the
variant within the enum.
This was surfaced in jamesmunns/postcard#79.
Hey, currently struggling with deserializing just serialized structs again. Sadly not getting much info for why, just getting an
Serde Deserialization Error
.This is the implementation of my test:
https://github.com/XBagon/gears/blob/egg/gears_core/src/gear_file.rs#L84
I feel like my struct isn't that complicated and I haven't done any manual Ser/De implemenations, so I'm struggling to even find a start where to debug :P.
Probably a whole test suite of just serializing and directly deserializing some example structs - maybe some of popular structs to catch stuff like #77 - would make sense for a crate like this?
The text was updated successfully, but these errors were encountered: