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 MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES #2149

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,16 @@ public enum DeserializationFeature implements ConfigFeature
*/
ACCEPT_FLOAT_AS_INT(true),

/**
* Feature that permits parsing dates/times and ignoring the case of the values. For example: when
* the `pattern="dd-MMM-yyyy"`, this feature will accept both '01-Jan-2018' and '01-JAN-2018'
* <p>
* Feature is disabled by default.
*
* @since 2.10
*/
ACCEPT_CASE_INSENSITIVE_VALUES(false),

/**
* Feature that determines standard deserialization mechanism used for
* Enum values: if enabled, Enums are assumed to have been serialized using
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/fasterxml/jackson/databind/MapperFeature.java
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@ public enum MapperFeature implements ConfigFeature
*/
ACCEPT_CASE_INSENSITIVE_PROPERTIES(false),

/**
* Feature that will allow for more forgiving deserialization of incoming JSON, particularly
* with respect to dates.
* If enabled, the values will be parsed using the built-in features of the underlying parser.
*<p>
* (see {@link java.time.format.DateTimeFormatterBuilder#parseCaseInsensitive()}
*<p>
* Feature is disabled by default.
*
* @since 2.10
*/
ACCEPT_CASE_INSENSITIVE_VALUES(false),

/**
* Feature that determines if Enum deserialization should be case sensitive or not.
Expand Down