All Implemented Interfaces:
JsonFormatVisitable, SchemaAware, ContextualSerializer, Serializable

public class EnumSerializer extends StdScalarSerializer<Enum<?>> implements ContextualSerializer
Standard serializer used for Enum types.

Based on StdScalarSerializer since the JSON value is scalar (String).

See Also:
  • Field Details

    • _values

      protected final EnumValues _values
      This map contains pre-resolved values (since there are ways to customize actual String constants to use) to use as serializations.
    • _serializeAsIndex

      protected final Boolean _serializeAsIndex
      Flag that is set if we statically know serialization choice between index and textual format (null if it needs to be dynamically checked).
      Since:
      2.1
  • Constructor Details

  • Method Details