T - The serializer typepublic interface CustomizableSerializer<T> extends Serializer<T>
Serializer.createSpecific(Serializer.EncoderContext, Argument).Serializer.EncoderContext| Modifier and Type | Method and Description |
|---|---|
default boolean |
isAbsent(Serializer.EncoderContext context,
T value)
Used for
JsonInclude.Include#NON_ABSENT checking. |
default boolean |
isEmpty(Serializer.EncoderContext context,
T value)
Used for
JsonInclude.Include#NON_EMPTY checking. |
default void |
serialize(Encoder encoder,
Serializer.EncoderContext context,
io.micronaut.core.type.Argument<? extends T> type,
T value)
Serializes the given value using the passed
Encoder. |
createSpecificdefault void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type, T value) throws java.io.IOException
SerializerEncoder.serialize in interface Serializer<T>encoder - The encoder to usecontext - The encoder context, never nulltype - Models the generic type of the valuevalue - The value, can be nulljava.io.IOException - If an error occurs during serializationdefault boolean isEmpty(Serializer.EncoderContext context, @Nullable T value)
SerializerJsonInclude.Include#NON_EMPTY checking.isEmpty in interface Serializer<T>context - The encoder contextvalue - The check to checktrue if the value is emptydefault boolean isAbsent(Serializer.EncoderContext context, @Nullable T value)
SerializerJsonInclude.Include#NON_ABSENT checking.isAbsent in interface Serializer<T>context - The encoder contextvalue - The value to checktrue if the value is absent