Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify serde_as handling around Options #470

Merged
merged 2 commits into from
Jun 6, 2022
Merged

Simplify serde_as handling around Options #470

merged 2 commits into from
Jun 6, 2022

Commits on Jun 5, 2022

  1. Detect if serde_as is used on Option fields and add default to re…

    …store support for missing fields
    
    A `with` or `deserialize_with` on an `Option` field removes the ability to allow missing fields.
    This modification detects if the field is `Option` and the transformation is `Option<T>`. In this
    case it is likely that the missing field behavior is desired.
    A `no_default` can be added to supress this new behavior.
    
    This commit does not include any documentation changes.
    
    Closes #185
    jonasbb committed Jun 5, 2022
    Configuration menu
    Copy the full SHA
    e7f2f5e View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Document new serde_as behavior

    Document when `serde_as` will add `#[serde(default)]` on a field.
    jonasbb committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    5d84054 View commit details
    Browse the repository at this point in the history