Class JDKKeySerializers.EnumKeySerializer

java.lang.Object
tools.jackson.databind.ValueSerializer<T>
tools.jackson.databind.ser.std.StdSerializer<Object>
tools.jackson.databind.ser.jdk.JDKKeySerializers.EnumKeySerializer
All Implemented Interfaces:
JsonFormatVisitable
Enclosing class:
JDKKeySerializers

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

  • Constructor Details

  • Method Details

    • construct

      public static JDKKeySerializers.EnumKeySerializer construct(Class<?> enumType, EnumValuesToWrite valuesToWrite)
    • serialize

      public void serialize(Object value, tools.jackson.core.JsonGenerator g, SerializationContext ctxt) throws tools.jackson.core.JacksonException
      Description copied from class: ValueSerializer
      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
      ctxt - Context that can be used to get serializers for serializing Objects value contains, if any.
      Throws:
      tools.jackson.core.JacksonException