Class CustomizedObjectArraySerializer

java.lang.Object
io.micronaut.serde.support.serdes.CustomizedObjectArraySerializer
All Implemented Interfaces:
Serializer<Object[]>

public final class CustomizedObjectArraySerializer extends Object implements Serializer<Object[]>
Deserializer for object arrays.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • CustomizedObjectArraySerializer

      public CustomizedObjectArraySerializer(io.micronaut.core.type.Argument<Object> componentType, Serializer<Object> componentSerializer)
  • Method Details

    • 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: Serializer
      Serializes the given value using the passed Encoder.
      Specified by:
      serialize in interface Serializer<Object[]>
      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
    • isEmpty

      public boolean isEmpty(Serializer.EncoderContext context, Object[] value)
      Description copied from interface: Serializer
      Used for JsonInclude.Include#NON_EMPTY checking.
      Specified by:
      isEmpty in interface Serializer<Object[]>
      Parameters:
      context - The encoder context
      value - The check to check
      Returns:
      Return true if the value is empty