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

Support READ_UNKNOWN_ENUM_VALUES_AS_NULL with @JsonCreator #1642

Merged
merged 1 commit into from
Jun 6, 2017

Commits on Jun 4, 2017

  1. Support READ_UNKNOWN_ENUM_VALUES_AS_NULL with @JsonCreator

    The deserialization feature READ_UNKNOWN_ENUM_VALUES_AS_NULL allows enum
    values that are not recognised to take a null value when parsed. Before
    this commit, this deserialization feature did not work whenever an enum
    had a method marked @JsonCreator, and the enum creator method itself had
    to choose null in the case of unknown input.
    
    With this change, if an enum creator method throws an
    IllegalArgumentException then this is considered to be an unknown value
    and (if READ_UNKNOWN_ENUM_VALUES_AS_NULL is active) then null will be
    used.
    joelittlejohn committed Jun 4, 2017
    Configuration menu
    Copy the full SHA
    45bee0d View commit details
    Browse the repository at this point in the history