Class UnmatchedFieldTypeModule

  • All Implemented Interfaces:
    com.fasterxml.jackson.core.Versioned, Serializable

    public class UnmatchedFieldTypeModule
    extends com.fasterxml.jackson.databind.module.SimpleModule
    Class that registers the capability of deserializing and serializing objects with properties that don't match the target's bean field types.
    
     ObjectMapper mapper = new ObjectMapper();
     mapper.registerModule(new UnmatchedFieldTypeModule());
     
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module

        com.fasterxml.jackson.databind.Module.SetupContext
    • Field Summary

      • Fields inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        _abstractTypes, _deserializerModifier, _deserializers, _hasExplicitName, _keyDeserializers, _keySerializers, _mixins, _name, _namingStrategy, _serializerModifier, _serializers, _subtypes, _valueInstantiators, _version
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isInTemplate()  
      static void removeInTemplate()  
      static void setInTemplate()  
      void setLogWarnings​(boolean logWarnings)
      Set if warnings should be logged for ambiguous serializer and deserializer situations.
      void setRestrictToTemplates​(boolean restrictToTemplates)
      Sets if the DeserializerModifier should only be applied to Templates or object trees contained in Templates.
      • Methods inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        _checkNotNull, addAbstractTypeMapping, addDeserializer, addKeyDeserializer, addKeySerializer, addSerializer, addSerializer, addValueInstantiator, getModuleName, getTypeId, registerSubtypes, registerSubtypes, registerSubtypes, setAbstractTypes, setDeserializerModifier, setDeserializers, setKeyDeserializers, setKeySerializers, setMixInAnnotation, setNamingStrategy, setSerializerModifier, setSerializers, setupModule, setValueInstantiators, version
      • Methods inherited from class com.fasterxml.jackson.databind.Module

        getDependencies
    • Constructor Detail

      • UnmatchedFieldTypeModule

        public UnmatchedFieldTypeModule()
      • UnmatchedFieldTypeModule

        public UnmatchedFieldTypeModule​(boolean logWarnings,
                                        boolean restrictToTemplates)
    • Method Detail

      • setLogWarnings

        public void setLogWarnings​(boolean logWarnings)
        Set if warnings should be logged for ambiguous serializer and deserializer situations.
        Parameters:
        logWarnings - if true, warnings will be logged.
      • setRestrictToTemplates

        public void setRestrictToTemplates​(boolean restrictToTemplates)
        Sets if the DeserializerModifier should only be applied to Templates or object trees contained in Templates.
        Parameters:
        restrictToTemplates - if true, the DeserializerModifier will only be applicable for Templates.
      • isInTemplate

        public static boolean isInTemplate()
      • setInTemplate

        public static void setInTemplate()
      • removeInTemplate

        public static void removeInTemplate()