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
Given that unit structs are represented as null per the serde-json spec, I don't think there's a good solution. I'm very fine to leave this as "Won't Fix": this was merely a surprise that I felt was worth poking at and adding to the Google search results :)
When writing to JSON,
Some(UnitStruct)
is serialized the same asNone
. This only seems to occur for structs with no data / fields.I haven't investigated if this is a problem in other file formats.
This then causes the deserialization to not match the original value.
The text was updated successfully, but these errors were encountered: