@Internal @Singleton @Primary public final class ObjectSerializer extends java.lang.Object implements CustomizableSerializer<java.lang.Object>
Serializer
for general Object
values. For deserialization, deserializes to
standard types
like Number
, String
, Boolean
, Map
and List
.
This class is used in multiple scenarios:
Object
property in a serializable bean.JsonMapper.writeValue(java.io.OutputStream, java.lang.Object)
(gen,
Object
.class)
Serializer.EncoderContext
Constructor and Description |
---|
ObjectSerializer(SerdeIntrospections introspections,
SerializationConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
Serializer<java.lang.Object> |
createSpecific(Serializer.EncoderContext encoderContext,
io.micronaut.core.type.Argument<? extends java.lang.Object> type)
Create a more specific serializer for the given definition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAbsent, isEmpty, serialize
public ObjectSerializer(SerdeIntrospections introspections, SerializationConfiguration configuration)
public Serializer<java.lang.Object> createSpecific(Serializer.EncoderContext encoderContext, io.micronaut.core.type.Argument<? extends java.lang.Object> type)
Serializer
createSpecific
in interface Serializer<java.lang.Object>
encoderContext
- The encoder contexttype
- The type definition including any annotation metadata