diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index fb1763a38a..d390515d16 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -6,6 +6,8 @@ Project: jackson-databind 2.10.0-final (not yet released) +#2149: Add `MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES` + (suggested by Craig P) #2309: READ_ENUMS_USING_TO_STRING doesn't support null values (reported, fix suggested by Ben A) #2442: `ArrayNode.addAll()` adds raw `null` values which cause NPE on `deepCopy()` diff --git a/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java b/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java index 9b7bb96f34..8cfe569d52 100644 --- a/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java +++ b/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java @@ -361,7 +361,7 @@ public enum MapperFeature implements ConfigFeature *

* Note that there is additional performance overhead since incoming property * names need to be lower-cased before comparison, for cases where there are upper-case - * letters. Overhead for names that are already lower-case should be negligible however. + * letters. Overhead for names that are already lower-case should be negligible. *

* Feature is disabled by default. * @@ -373,7 +373,7 @@ public enum MapperFeature implements ConfigFeature /** * Feature that determines if Enum deserialization should be case sensitive or not. * If enabled, Enum deserialization will ignore case, that is, case of incoming String - * value and enum id (dependant on other settings, either `name()`, `toString()`, or + * value and enum id (depending on other settings, either `name()`, `toString()`, or * explicit override) do not need to match. *

* Feature is disabled by default. @@ -382,6 +382,20 @@ public enum MapperFeature implements ConfigFeature */ ACCEPT_CASE_INSENSITIVE_ENUMS(false), + /** + * Feature that permits parsing some enumerated text-based value types but ignoring the case + * of the values on deserialization: for example, date/time type deserializers. + * Support for this feature depends on deserializer implementations using it. + *

+ * Note, however, that regular {@code Enum} types follow {@link #ACCEPT_CASE_INSENSITIVE_ENUMS} + * setting instead. + *

+ * Feature is disabled by default. + * + * @since 2.10 + */ + ACCEPT_CASE_INSENSITIVE_VALUES(false), + /** * Feature that can be enabled to make property names be * overridden by wrapper name (usually detected with annotations