T - The type to deserialize@FunctionalInterface public interface NullableDeserializer<T> extends Deserializer<T>
Deserializer for deserializers that allow
null. Deals with the decoding of null and delegates to deserializeNonNull(io.micronaut.serde.Decoder, io.micronaut.serde.Deserializer.DecoderContext, io.micronaut.core.type.Argument).Deserializer.DecoderContext| Modifier and Type | Method and Description |
|---|---|
default boolean |
allowNull() |
default T |
deserialize(Decoder decoder,
Deserializer.DecoderContext context,
io.micronaut.core.type.Argument<? super T> type)
Deserializes from the current state of the
Decoder an object of type T. |
T |
deserializeNonNull(Decoder decoder,
Deserializer.DecoderContext decoderContext,
io.micronaut.core.type.Argument<? super T> type)
A method that is invoked when the value is known not to be null.
|
createSpecific, getDefaultValuedefault T deserialize(Decoder decoder, Deserializer.DecoderContext context, io.micronaut.core.type.Argument<? super T> type) throws java.io.IOException
DeserializerDecoder an object of type T.deserialize in interface Deserializer<T>decoder - The decoder, never nullcontext - The decoder context, never nulltype - The generic type to be deserializednull only if Deserializer.allowNull() returns truejava.io.IOException - If an error occurs during deserialization of the object@NonNull T deserializeNonNull(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) throws java.io.IOException
decoder - The decoderdecoderContext - The decoder contexttype - The typejava.io.IOException - if something goes wrong during deserializationdefault boolean allowNull()
allowNull in interface Deserializer<T>null