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
What i expect the code is to deserialize the json string with a default FooSettings instance as the Foo varant value, and serialize the enum without "settings" field.
But currelty the output is:
calling de():
Error: missing field `settings` at line 4 column 5
calling ser():
{
"type": "foo",
"settings": {
"value": ""
}
}
The text was updated successfully, but these errors were encountered:
Looking at the derive macro code the skip_serializing_if and default attributes are not taken into account for newtype variants in adjacently tagged enums
Currently, #[serde(default, skip_serializing_if = "is_default"] below has no effects.
What i expect the code is to deserialize the json string with a default FooSettings instance as the Foo varant value, and serialize the enum without "settings" field.
But currelty the output is:
The text was updated successfully, but these errors were encountered: