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

Add JsonFormat.Features: READ_UNKNOWN_ENUM_VALUES_AS_NULL, READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE #211

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,23 @@ public enum Feature {
*/
ACCEPT_CASE_INSENSITIVE_PROPERTIES,

/**
* Override for <code>DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL</code>,
* which allows unknown Enum values to be parsed as null values.
*
* @since 2.15
*/
READ_UNKNOWN_ENUM_VALUES_AS_NULL,
cowtowncoder marked this conversation as resolved.
Show resolved Hide resolved

/**
* Override for <code>DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE</code>,
* which allows unknown Enum values to be ignored and a predefined value specified through
* {@link com.fasterxml.jackson.annotation.JsonEnumDefaultValue @JsonEnumDefaultValue} annotation.
*
* @since 2.15
*/
READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE,

/**
* Override for <code>MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES</code>,
* which allows case-sensitive matching of (some) property values, such
Expand Down