public abstract class StdKeySerializers extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StdKeySerializers.Default
This is a "chameleon" style multi-type key serializer for simple
standard JDK types.
|
static class |
StdKeySerializers.Dynamic
Key serializer used when key type is not known statically, and actual key
serializer needs to be dynamically located.
|
static class |
StdKeySerializers.EnumKeySerializer
Specialized instance to use for Enum keys, as per [databind#1322]
|
static class |
StdKeySerializers.StringKeySerializer
Simple and fast key serializer when keys are Strings.
|
Modifier and Type | Field and Description |
---|---|
protected static JsonSerializer<Object> |
DEFAULT_KEY_SERIALIZER |
protected static JsonSerializer<Object> |
DEFAULT_STRING_SERIALIZER |
Constructor and Description |
---|
StdKeySerializers() |
Modifier and Type | Method and Description |
---|---|
static JsonSerializer<Object> |
getDefault()
Deprecated.
since 2.7
|
static 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) |
protected static final JsonSerializer<Object> DEFAULT_KEY_SERIALIZER
protected static final JsonSerializer<Object> DEFAULT_STRING_SERIALIZER
public static JsonSerializer<Object> getStdKeySerializer(SerializationConfig config, Class<?> rawKeyType, boolean useDefault)
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)?public static JsonSerializer<Object> getFallbackKeySerializer(SerializationConfig config, Class<?> rawKeyType)
@Deprecated public static JsonSerializer<Object> getDefault()
Copyright © 2008–2019 FasterXML. All rights reserved.