@@ -385,13 +385,54 @@ public BeanDeserializerBase(BeanDeserializerBase src, Set<String> ignorableProps
385
385
_beanProperties = src ._beanProperties .withoutProperties (ignorableProps );
386
386
}
387
387
388
+ /**
389
+ * @since 2.8
390
+ */
391
+ protected BeanDeserializerBase (BeanDeserializerBase src , BeanPropertyMap beanProps )
392
+ {
393
+ super (src ._beanType );
394
+
395
+ _classAnnotations = src ._classAnnotations ;
396
+ _beanType = src ._beanType ;
397
+
398
+ _valueInstantiator = src ._valueInstantiator ;
399
+ _delegateDeserializer = src ._delegateDeserializer ;
400
+ _propertyBasedCreator = src ._propertyBasedCreator ;
401
+
402
+ _beanProperties = beanProps ;
403
+ _backRefs = src ._backRefs ;
404
+ _ignorableProps = src ._ignorableProps ;
405
+ _ignoreAllUnknown = src ._ignoreAllUnknown ;
406
+ _anySetter = src ._anySetter ;
407
+ _injectables = src ._injectables ;
408
+ _objectIdReader = src ._objectIdReader ;
409
+
410
+ _nonStandardCreation = src ._nonStandardCreation ;
411
+ _unwrappedPropertyHandler = src ._unwrappedPropertyHandler ;
412
+ _needViewProcesing = src ._needViewProcesing ;
413
+ _serializationShape = src ._serializationShape ;
414
+
415
+ _vanillaProcessing = src ._vanillaProcessing ;
416
+ }
417
+
388
418
@ Override
389
419
public abstract JsonDeserializer <Object > unwrappingDeserializer (NameTransformer unwrapper );
390
420
391
421
public abstract BeanDeserializerBase withObjectIdReader (ObjectIdReader oir );
392
422
393
423
public abstract BeanDeserializerBase withIgnorableProperties (Set <String > ignorableProps );
394
424
425
+ /**
426
+ * Mutant factory method that custom sub-classes must override; not left as
427
+ * abstract to prevent more drastic backwards compatibility problems.
428
+ *
429
+ * @since 2.8
430
+ */
431
+ public BeanDeserializerBase withBeanProperties (BeanPropertyMap props ) {
432
+ throw new UnsupportedOperationException ("Class " +getClass ().getName ()
433
+ +" does not override `withBeanProperties()`, needs to" );
434
+ }
435
+
395
436
/**
396
437
* Fluent factory for creating a variant that can handle
397
438
* POJO output as a JSON Array. Implementations may ignore this request
@@ -690,9 +731,22 @@ public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
690
731
// One more thing: are we asked to serialize POJO as array?
691
732
JsonFormat .Value format = findFormatOverrides (ctxt , property , handledType ());
692
733
JsonFormat .Shape shape = null ;
693
- if ((format != null ) && format .hasShape ()) {
694
- shape = format .getShape ();
734
+ if (format != null ) {
735
+ if (format .hasShape ()) {
736
+ shape = format .getShape ();
737
+ }
738
+ // 16-May-2016, tatu: How about per-property case-insensitivity?
739
+ Boolean B = format .getFeature (JsonFormat .Feature .ACCEPT_CASE_INSENSITIVE_PROPERTIES );
740
+ if (B != null ) {
741
+ // !!! TODO
742
+ BeanPropertyMap propsOrig = _beanProperties ;
743
+ BeanPropertyMap props = propsOrig .withCaseInsensitivity (B .booleanValue ());
744
+ if (props != propsOrig ) {
745
+ contextual = contextual .withBeanProperties (props );
746
+ }
747
+ }
695
748
}
749
+
696
750
if (shape == null ) {
697
751
shape = _serializationShape ;
698
752
}
0 commit comments