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
rename_all is useful in situations where the format you're serializing from and the format you're serializing to may have different forms (i.e. rename_all(serialize = "SCREAMING_SNAKE_CASE", deserialize = "kebab-case"). It seems that when specifying tag for enums, the tag name is not affected by the rename_all attribute. This leads to inconsistencies in the serialized/deserialized data. There is also no way to specify a different tag value for Serialize and Deserialize.
rename_all
is useful in situations where the format you're serializing from and the format you're serializing to may have different forms (i.e.rename_all(serialize = "SCREAMING_SNAKE_CASE", deserialize = "kebab-case")
. It seems that when specifyingtag
for enums, the tag name is not affected by therename_all
attribute. This leads to inconsistencies in the serialized/deserialized data. There is also no way to specify a different tag value forSerialize
andDeserialize
.Example Output from
serde_json::to_string_pretty
:Example Code:
playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f5b7b498f6ae4abfbd85b905a6b28b34
The text was updated successfully, but these errors were encountered: