Class StdKeySerializers.EnumKeySerializer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<Object>
com.fasterxml.jackson.databind.ser.std.StdKeySerializers.EnumKeySerializer
All Implemented Interfaces:
JsonFormatVisitable, SchemaAware, Serializable
Enclosing class:
StdKeySerializers

public static class StdKeySerializers.EnumKeySerializer extends StdSerializer<Object>
Specialized instance to use for Enum keys, as per [databind#1322]
Since:
2.8
See Also:
  • Field Details

  • Constructor Details

    • EnumKeySerializer

      protected EnumKeySerializer(Class<?> enumType, EnumValues values)
  • Method Details

    • construct

      public static StdKeySerializers.EnumKeySerializer construct(Class<?> enumType, EnumValues enumValues)
    • serialize

      public void serialize(Object value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider serializers) throws IOException
      Description copied from class: JsonSerializer
      Method that can be called to ask implementation to serialize values of type this serializer handles.
      Specified by:
      serialize in class StdSerializer<Object>
      Parameters:
      value - Value to serialize; can not be null.
      g - Generator used to output resulting Json content
      serializers - Provider that can be used to get serializers for serializing Objects value contains, if any.
      Throws:
      IOException