public static class StdKeySerializers.EnumKeySerializer extends StdSerializer<Object>
JsonSerializer.None
Modifier and Type | Field and Description |
---|---|
protected EnumValues |
_values |
protected EnumValues |
_valuesByEnumNaming
Map with key as converted property class defined implementation of
EnumNamingStrategy
and with value as Enum names collected using Enum.name() . |
_handledType
Modifier | Constructor and Description |
---|---|
protected |
EnumKeySerializer(Class<?> enumType,
EnumValues values) |
protected |
EnumKeySerializer(Class<?> enumType,
EnumValues values,
EnumValues valuesByEnumNaming) |
Modifier and Type | Method and Description |
---|---|
static StdKeySerializers.EnumKeySerializer |
construct(Class<?> enumType,
EnumValues enumValues) |
static StdKeySerializers.EnumKeySerializer |
construct(Class<?> enumType,
EnumValues enumValues,
EnumValues valuesByEnumNaming) |
void |
serialize(Object value,
com.fasterxml.jackson.core.JsonGenerator g,
SerializerProvider serializers)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
protected final EnumValues _values
protected final EnumValues _valuesByEnumNaming
EnumNamingStrategy
and with value as Enum names collected using Enum.name()
.protected EnumKeySerializer(Class<?> enumType, EnumValues values)
protected EnumKeySerializer(Class<?> enumType, EnumValues values, EnumValues valuesByEnumNaming)
public static StdKeySerializers.EnumKeySerializer construct(Class<?> enumType, EnumValues enumValues)
public static StdKeySerializers.EnumKeySerializer construct(Class<?> enumType, EnumValues enumValues, EnumValues valuesByEnumNaming)
public void serialize(Object value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider serializers) throws IOException
JsonSerializer
serialize
in class StdSerializer<Object>
value
- Value to serialize; can not be null.g
- Generator used to output resulting Json contentserializers
- Provider that can be used to get serializers for
serializing Objects value contains, if any.IOException
Copyright © 2008–2024 FasterXML. All rights reserved.