Class StdKeySerializers
- java.lang.Object
-
- com.fasterxml.jackson.databind.ser.std.StdKeySerializers
-
public abstract class StdKeySerializers extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStdKeySerializers.DefaultThis is a "chameleon" style multi-type key serializer for simple standard JDK types.static classStdKeySerializers.DynamicKey serializer used when key type is not known statically, and actual key serializer needs to be dynamically located.static classStdKeySerializers.EnumKeySerializerSpecialized instance to use for Enum keys, as per [databind#1322]static classStdKeySerializers.StringKeySerializerSimple and fast key serializer when keys are Strings.
-
Field Summary
Fields Modifier and Type Field Description protected static JsonSerializer<Object>DEFAULT_KEY_SERIALIZERprotected static JsonSerializer<Object>DEFAULT_STRING_SERIALIZER
-
Constructor Summary
Constructors Constructor Description StdKeySerializers()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static JsonSerializer<Object>getDefault()Deprecated.since 2.7static JsonSerializer<Object>getFallbackKeySerializer(SerializationConfig config, Class<?> rawKeyType)Method called if no specified key serializer was located; will return a "default" key serializer.static JsonSerializer<Object>getStdKeySerializer(SerializationConfig config, Class<?> rawKeyType, boolean useDefault)
-
-
-
Field Detail
-
DEFAULT_KEY_SERIALIZER
protected static final JsonSerializer<Object> DEFAULT_KEY_SERIALIZER
-
DEFAULT_STRING_SERIALIZER
protected static final JsonSerializer<Object> DEFAULT_STRING_SERIALIZER
-
-
Method Detail
-
getStdKeySerializer
public static JsonSerializer<Object> getStdKeySerializer(SerializationConfig config, Class<?> rawKeyType, boolean useDefault)
- Parameters:
config- Serialization configuration in use, may be needed in choosing serializer to userawKeyType- Type of key values to serializeuseDefault- If no match is found, should we return fallback deserializer (true), or null (false)?
-
getFallbackKeySerializer
public static JsonSerializer<Object> getFallbackKeySerializer(SerializationConfig config, Class<?> rawKeyType)
Method called if no specified key serializer was located; will return a "default" key serializer.- Since:
- 2.7
-
getDefault
@Deprecated public static JsonSerializer<Object> getDefault()
Deprecated.since 2.7
-
-