Class JsonbTypeSerializerBridge
java.lang.Object
io.micronaut.serde.jsonb.JsonbTypeSerializerBridge
- All Implemented Interfaces:
Serializer<Object>
@Internal
@Bean(typed=JsonbTypeSerializerBridge.class)
public final class JsonbTypeSerializerBridge
extends Object
implements Serializer<Object>
Bridges
JsonbTypeSerializer to Micronaut Serialization.-
Nested Class Summary
Nested classes/interfaces inherited from interface Serializer
Serializer.EncoderContext -
Method Summary
Modifier and TypeMethodDescriptioncreateSpecific(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends Object> type) Create a more specific serializer for the given definition.voidserialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends Object> type, Object value) Serializes the given value using the passedEncoder.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Serializer
isAbsent, isDefault, isEmpty
-
Method Details
-
createSpecific
public Serializer<Object> createSpecific(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends Object> type) throws SerdeException Description copied from interface:SerializerCreate a more specific serializer for the given definition.- Specified by:
createSpecificin interfaceSerializer<Object>- Parameters:
context- The encoder contexttype- The type definition including any annotation metadata- Returns:
- The more specific serializer
- Throws:
SerdeException
-
serialize
public void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends Object> type, Object value) throws IOException Description copied from interface:SerializerSerializes the given value using the passedEncoder.- Specified by:
serializein interfaceSerializer<Object>- Parameters:
encoder- The encoder to usecontext- The encoder context, nevernulltype- Models the generic type of the valuevalue- The value to serialize, nevernull. Callers should encode null values directly.- Throws:
IOException- If an error occurs during serialization
-