Package org.dominokit.jacksonapt.ser
Class RawValueJsonSerializer<T>
java.lang.Object
org.dominokit.jacksonapt.JsonSerializer<T>
org.dominokit.jacksonapt.ser.RawValueJsonSerializer<T>
public class RawValueJsonSerializer<T> extends JsonSerializer<T>
Dummy
JsonSerializer that will just output raw values by calling toString() on value to serialize.- Version:
- $Id: $
- Author:
- Nicolas Morel
-
Method Summary
Modifier and Type Method Description protected voiddoSerialize(JsonWriter writer, java.lang.Object value, JsonSerializationContext ctx, JsonSerializerParameters params)Serializes a non-null object into JSON output.static <T> RawValueJsonSerializer<T>getInstance()getInstanceMethods inherited from class org.dominokit.jacksonapt.JsonSerializer
isAbsent, isDefault, 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
- Type Parameters:
T- a T object.- Returns:
- an instance of
RawValueJsonSerializer
-
doSerialize
protected void doSerialize(JsonWriter writer, java.lang.Object value, JsonSerializationContext ctx, JsonSerializerParameters params)Serializes a non-null object into JSON output.- Specified by:
doSerializein classJsonSerializer<T>- Parameters:
writer-JsonWriterused to write the serialized JSONvalue- Object to serializectx- Context for the full serialization processparams- Parameters for this serialization
-