Class UnmatchedFieldTypeModule

  • All Implemented Interfaces:
    Versioned, Serializable

    public class UnmatchedFieldTypeModule
    extends 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
    • 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()