public abstract class KeySerializer<T>
extends java.lang.Object
Map key serializer. It handles null values and exceptions. The rest is delegated to implementations.| Constructor and Description |
|---|
KeySerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
doSerialize(T value,
JsonSerializationContext ctx)
Serializes a non-null object into a
String to use as map's key. |
java.lang.String |
serialize(T value,
JsonSerializationContext ctx)
Serializes an object into a
String to use as map's key. |
public java.lang.String serialize(T value, JsonSerializationContext ctx) throws JsonSerializationException
String to use as map's key.value - Object to serializectx - Context for the full serialization processJsonSerializationException - if an error occurs during the serializationprotected abstract java.lang.String doSerialize(@Nonnull
T value,
JsonSerializationContext ctx)
String to use as map's key.value - Object to serializectx - Context for the full serialization processCopyright © 2014. All Rights Reserved.