Skip to content

Allow serializing enums to lowercase (EnumFeature.WRITE_ENUMS_TO_LOWERCASE) #3053

@vojkny

Description

@vojkny

Is your feature request related to a problem? Please describe.
Java enums are usually defined as UPPER_CASE_WITH_UNDERSCORE. This is not a standard in endpoints, as these rather use lower_case_with_underscore. There is already feature for ACCEPT_CASE_INSENSITIVE_ENUMS, which helps with deserialization, the feature for serialization is however currently missing. Only option is using @JsonProperty or toString() serialization.

Describe the solution you'd like
I would like to have SerializationFeature.WRITE_ENUM_LOWERCASED.

Usage example
Any API endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enumRelated to handling of Enum values

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions