Class JsonMediaTypeCodec

java.lang.Object
io.micronaut.json.codec.MapperMediaTypeCodec
io.micronaut.jackson.codec.JacksonMediaTypeCodec
io.micronaut.jackson.codec.JsonMediaTypeCodec
All Implemented Interfaces:
io.micronaut.http.codec.MediaTypeCodec
Direct Known Subclasses:
JsonStreamMediaTypeCodec

@Named("json") @Singleton @Secondary @Bean(typed={JsonMediaTypeCodec.class,JacksonMediaTypeCodec.class}) @Deprecated(forRemoval=true, since="4.7") public class JsonMediaTypeCodec extends JacksonMediaTypeCodec
Deprecated, for removal: This API element is subject to removal in a future version.
Replaced with message body writers / readers API
A MediaTypeCodec for JSON and Jackson.

Note: will be replaced by JsonMediaTypeCodec in the future, but that class is currently experimental.

Since:
1.0.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Fields inherited from class io.micronaut.jackson.codec.JacksonMediaTypeCodec

    REGULAR_JSON_MEDIA_TYPE_CODEC_NAME

    Fields inherited from class io.micronaut.json.codec.MapperMediaTypeCodec

    additionalTypes, applicationConfiguration, codecConfiguration, mediaType
  • Constructor Summary

    Constructors
    Constructor
    Description
    JsonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, @Nullable io.micronaut.http.codec.CodecConfiguration codecConfiguration)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    JsonMediaTypeCodec(io.micronaut.context.BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, @Nullable io.micronaut.http.codec.CodecConfiguration codecConfiguration)
    JsonMediaTypeCodec(io.micronaut.context.BeanProvider<JacksonDatabindMapper> jacksonDatabindMappers, @Nullable io.micronaut.http.codec.CodecConfiguration codecConfiguration, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new codec with the provided features.

    Methods inherited from class io.micronaut.jackson.codec.JacksonMediaTypeCodec

    cloneWithFeatures, cloneWithMapper, decode, getObjectMapper

    Methods inherited from class io.micronaut.json.codec.MapperMediaTypeCodec

    cloneWithViewClass, decode, decode, decode, decode, decode, encode, encode, encode, encode, encode, encode, getJsonMapper, getMediaTypes, supportsType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.http.codec.MediaTypeCodec

    decode, decode, decode, decode
  • Field Details

    • CONFIGURATION_QUALIFIER

      public static final String CONFIGURATION_QUALIFIER
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • JsonMediaTypeCodec

      public JsonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, @Named("json") @Nullable @Nullable io.micronaut.http.codec.CodecConfiguration codecConfiguration)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      objectMapper - To read/write JSON
      applicationConfiguration - The common application configurations
      codecConfiguration - The configuration for the codec
    • JsonMediaTypeCodec

      @Deprecated public JsonMediaTypeCodec(io.micronaut.context.BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, @Named("json") @Nullable @Nullable io.micronaut.http.codec.CodecConfiguration codecConfiguration)
      Parameters:
      objectMapper - To read/write JSON
      applicationConfiguration - The common application configurations
      codecConfiguration - The configuration for the codec
    • JsonMediaTypeCodec

      @Inject public JsonMediaTypeCodec(io.micronaut.context.BeanProvider<JacksonDatabindMapper> jacksonDatabindMappers, @Named("json") @Nullable @Nullable io.micronaut.http.codec.CodecConfiguration codecConfiguration, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      jacksonDatabindMappers - To read/write JSON
      applicationConfiguration - The common application configurations
      codecConfiguration - The configuration for the codec
  • Method Details