T
- The deserializer typepublic interface CustomizableDeserializer<T> extends Deserializer<T>
Deserializer.createSpecific(DecoderContext, 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 . |
default T |
getDefaultValue(Deserializer.DecoderContext context,
io.micronaut.core.type.Argument<? super T> type)
Obtains a default value that can be returned from this deserializer in the case where a value is absent.
|
createSpecific
default T deserialize(Decoder decoder, Deserializer.DecoderContext context, io.micronaut.core.type.Argument<? super T> type) throws java.io.IOException
Deserializer
Decoder
an object of type T
.deserialize
in interface Deserializer<T>
decoder
- The decoder, never null
context
- The decoder context, never null
type
- The generic type to be deserializednull
only if Deserializer.allowNull()
returns true
java.io.IOException
- If an error occurs during deserialization of the objectdefault boolean allowNull()
allowNull
in interface Deserializer<T>
null
default T getDefaultValue(Deserializer.DecoderContext context, io.micronaut.core.type.Argument<? super T> type)
Deserializer
getDefaultValue
in interface Deserializer<T>
context
- The decoder context, never null
type
- The generic type to be deserialized