Package org.dominokit.jacksonapt.ser
Class BooleanJsonSerializer
java.lang.Object
org.dominokit.jacksonapt.JsonSerializer<java.lang.Boolean>
org.dominokit.jacksonapt.ser.BooleanJsonSerializer
public class BooleanJsonSerializer extends JsonSerializer<java.lang.Boolean>
Default
JsonSerializer implementation for Boolean.- Version:
- $Id: $
- Author:
- Nicolas Morel
-
Method Summary
Modifier and Type Method Description voiddoSerialize(JsonWriter writer, java.lang.Boolean value, JsonSerializationContext ctx, JsonSerializerParameters params)Serializes a non-null object into JSON output.static BooleanJsonSerializergetInstance()getInstanceprotected booleanisDefault(java.lang.Boolean value)isDefault.Methods inherited from class org.dominokit.jacksonapt.JsonSerializer
isAbsent, isEmpty, serialize, serialize, serialize, serializeNullValueMethods 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
BooleanJsonSerializer
-
isDefault
protected boolean isDefault(java.lang.Boolean value)isDefault.
- Overrides:
isDefaultin classJsonSerializer<java.lang.Boolean>- Parameters:
value- the value- Returns:
- true if the value corresponds to the default one
-
doSerialize
public void doSerialize(JsonWriter writer, java.lang.Boolean value, JsonSerializationContext ctx, JsonSerializerParameters params)Serializes a non-null object into JSON output.- Specified by:
doSerializein classJsonSerializer<java.lang.Boolean>- Parameters:
writer-JsonWriterused to write the serialized JSONvalue- Object to serializectx- Context for the full serialization processparams- Parameters for this serialization
-