Class BooleanKeySerializer
java.lang.Object
org.dominokit.jacksonapt.ser.map.key.KeySerializer<java.lang.Boolean>
org.dominokit.jacksonapt.ser.map.key.BooleanKeySerializer
public final class BooleanKeySerializer extends KeySerializer<java.lang.Boolean>
Default
KeySerializer implementation for Boolean.- Version:
- $Id: $
- Author:
- Nicolas Morel
-
Method Summary
Modifier and Type Method Description protected java.lang.StringdoSerialize(java.lang.Boolean value, JsonSerializationContext ctx)Serializes a non-null object into aStringto use as map's key.static BooleanKeySerializergetInstance()getInstancebooleanmustBeEscaped(JsonSerializationContext ctx)mustBeEscapedMethods inherited from class org.dominokit.jacksonapt.ser.map.key.KeySerializer
serializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
getInstance
getInstance
- Returns:
- an instance of
BooleanKeySerializer
-
mustBeEscaped
mustBeEscaped
- Overrides:
mustBeEscapedin classKeySerializer<java.lang.Boolean>- Parameters:
ctx- Context for the full serialization process- Returns:
- true if the serialized key must be escaped
-
doSerialize
Serializes a non-null object into aStringto use as map's key.- Specified by:
doSerializein classKeySerializer<java.lang.Boolean>- Parameters:
value- Object to serializectx- Context for the full serialization process- Returns:
- the key
-