Class JsonbTypeSerializerBridge

java.lang.Object
io.micronaut.serde.jsonb.JsonbTypeSerializerBridge
All Implemented Interfaces:
Serializer<Object>

@Internal @Bean(typed=JsonbTypeSerializerBridge.class) public final class JsonbTypeSerializerBridge extends Object implements Serializer<Object>
Bridges JsonbTypeSerializer to Micronaut Serialization.
  • Method Details

    • createSpecific

      public Serializer<Object> createSpecific(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends Object> type) throws SerdeException
      Description copied from interface: Serializer
      Create a more specific serializer for the given definition.
      Specified by:
      createSpecific in interface Serializer<Object>
      Parameters:
      context - The encoder context
      type - The type definition including any annotation metadata
      Returns:
      The more specific serializer
      Throws:
      SerdeException
    • 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 to serialize, never null. Callers should encode null values directly.
      Throws:
      IOException - If an error occurs during serialization