Class SimpleObjectSerializer<T>
java.lang.Object
io.micronaut.serde.support.serializers.SimpleObjectSerializer<T>
- Type Parameters:
T- The bean type
- All Implemented Interfaces:
Serializer<T>
Simple object serializer.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.Serializer
Serializer.EncoderContext -
Constructor Summary
ConstructorsConstructorDescriptionSimpleObjectSerializer(io.micronaut.serde.support.serializers.SerBean<Object> serBean) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.serde.Serializer
createSpecific, isAbsent, isEmpty
-
Constructor Details
-
SimpleObjectSerializer
-
-
Method Details
-
serialize
public void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type, T value) throws IOException Description copied from interface:SerializerSerializes the given value using the passedEncoder.- Specified by:
serializein interfaceSerializer<T>- Parameters:
encoder- The encoder to usecontext- The encoder context, nevernulltype- Models the generic type of the valuevalue- The value, can benull- Throws:
IOException- If an error occurs during serialization
-