Skip to content

Case insensitive enum deserialization feature #1313

@yissachar

Description

@yissachar

Enums are only properly deserialized if the value is uppercase. We don't want to force all clients to have to manipulate their data into uppercase, so we would like to accept a String case-insensitively and have it be deserialized into the correct enum.

Others have encountered this issue and there are various solutions for achieving this effect.

I think this feature is used often enough that it warrants being added to the core, so that we could simply do something like:

mapper.configure(DeserializationFeature.READ_ENUMS_CASE_INSENSITIVELY, true);

Instead of having to search up the solution each time we encounter this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions