Class StdKeySerializers.EnumKeySerializer

    • Field Detail

      • _valuesByEnumNaming

        protected final EnumValues _valuesByEnumNaming
        Map with key as converted property class defined implementation of EnumNamingStrategy and with value as Enum names collected using Enum.name().
        Since:
        2.15
    • Constructor Detail

      • EnumKeySerializer

        protected EnumKeySerializer​(java.lang.Class<?> enumType,
                                    EnumValues values)
      • EnumKeySerializer

        protected EnumKeySerializer​(java.lang.Class<?> enumType,
                                    EnumValues values,
                                    EnumValues valuesByEnumNaming)
        Since:
        2.15
    • Method Detail

      • serialize

        public void serialize​(java.lang.Object value,
                              com.fasterxml.jackson.core.JsonGenerator g,
                              SerializerProvider serializers)
                       throws java.io.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<java.lang.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:
        java.io.IOException