Interface ObjectSerializer<T>

Type Parameters:
T - The object type to be serialized
All Superinterfaces:
Serializer<T>

@Indexed(ObjectSerializer.class) public interface ObjectSerializer<T> extends Serializer<T>
A variation of Serializer that is serializing an object and supports serializing its content into an existing object.
Since:
2.3
Author:
Denis Stepanov
  • Method Details

    • serializeInto

      void serializeInto(@NonNull @NonNull Encoder encoder, @NonNull @NonNull Serializer.EncoderContext context, @NonNull @NonNull io.micronaut.core.type.Argument<? extends T> type, @NonNull T value) throws IOException
      Serializes the object values using the passed object encoder.
      Parameters:
      encoder - The object 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