Class SimpleSerializers

java.lang.Object
tools.jackson.databind.ser.Serializers.Base
tools.jackson.databind.module.SimpleSerializers
All Implemented Interfaces:
Serializable, Serializers

public class SimpleSerializers extends Serializers.Base implements Serializable
Simple implementation Serializers which allows registration of serializers based on raw (type erased class). It can work well for basic bean and scalar type serializers, but is not a good fit for handling generic types (like Maps and Collections).

Type registrations are assumed to be general; meaning that registration of serializer for a super type will also be used for handling subtypes, unless an exact match is found first. As an example, handler for CharSequence would also be used serializing StringBuilder instances, unless a direct mapping was found.

See Also:
  • Field Details

    • _classMappings

      protected HashMap<ClassKey,ValueSerializer<?>> _classMappings
      Class-based mappings that are used both for exact and sub-class matches.
    • _interfaceMappings

      protected HashMap<ClassKey,ValueSerializer<?>> _interfaceMappings
      Interface-based matches.
    • _hasEnumSerializer

      protected boolean _hasEnumSerializer
      Flag to help find "generic" enum serializer, if one has been registered.
  • Constructor Details

    • SimpleSerializers

      public SimpleSerializers()
    • SimpleSerializers

      public SimpleSerializers(List<ValueSerializer<?>> sers)
  • Method Details