Class SimpleObjectSerializer<T>

java.lang.Object
io.micronaut.serde.support.serializers.SimpleObjectSerializer<T>
Type Parameters:
T - The bean type
All Implemented Interfaces:
Serializer<T>

@Internal public final class SimpleObjectSerializer<T> extends Object implements Serializer<T>
Simple object serializer.
Since:
1.0
Author:
Denis Stepanov
  • Constructor Details

    • SimpleObjectSerializer

      public SimpleObjectSerializer(io.micronaut.serde.support.serializers.SerBean<Object> serBean)
  • 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: Serializer
      Serializes the given value using the passed Encoder.
      Specified by:
      serialize in interface Serializer<T>
      Parameters:
      encoder - The encoder to use
      context - The encoder context, never null
      type - Models the generic type of the value
      value - The value, can be null
      Throws:
      IOException - If an error occurs during serialization