File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
main/java/com/fasterxml/jackson/annotation
test/java/com/fasterxml/jackson/annotation Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,14 @@ public enum Feature {
253
253
*/
254
254
ACCEPT_CASE_INSENSITIVE_PROPERTIES ,
255
255
256
+ /**
257
+ * Override for <code>MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES</code>.
258
+ * Only affects deserialization, has no effect on serialization.
259
+ *
260
+ * @since 2.10
261
+ */
262
+ ACCEPT_CASE_INSENSITIVE_VALUES ,
263
+
256
264
/**
257
265
* Override for <code>SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS</code>,
258
266
* similar constraints apply.
Original file line number Diff line number Diff line change @@ -186,6 +186,17 @@ public void testLeniency() {
186
186
assertFalse (dunno .equals (lenient ));
187
187
}
188
188
189
+ public void testCaseInsensitiveValues () {
190
+ JsonFormat .Value empty = JsonFormat .Value .empty ();
191
+ assertNull (empty .getFeature (Feature .ACCEPT_CASE_INSENSITIVE_VALUES ));
192
+
193
+ JsonFormat .Value insensitive = empty .withFeature (Feature .ACCEPT_CASE_INSENSITIVE_VALUES );
194
+ assertTrue (insensitive .getFeature (Feature .ACCEPT_CASE_INSENSITIVE_VALUES ));
195
+
196
+ JsonFormat .Value sensitive = empty .withoutFeature (Feature .ACCEPT_CASE_INSENSITIVE_VALUES );
197
+ assertFalse (sensitive .getFeature (Feature .ACCEPT_CASE_INSENSITIVE_VALUES ));
198
+ }
199
+
189
200
public void testShape () {
190
201
assertFalse (JsonFormat .Shape .STRING .isNumeric ());
191
202
assertFalse (JsonFormat .Shape .STRING .isStructured ());
You can’t perform that action at this time.
0 commit comments