@Named(value="json") @Singleton @Secondary @Bean(typed={JsonMediaTypeCodec.class,JacksonMediaTypeCodec.class}) public class JsonMediaTypeCodec extends JacksonMediaTypeCodec
MediaTypeCodec
for JSON and Jackson.
Note: will be replaced by JsonMediaTypeCodec
in the future, but that class is
currently experimental.Modifier and Type | Field and Description |
---|---|
static String |
CONFIGURATION_QUALIFIER |
REGULAR_JSON_MEDIA_TYPE_CODEC_NAME
additionalTypes, applicationConfiguration, codecConfiguration, mediaType
Constructor and Description |
---|
JsonMediaTypeCodec(BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper,
ApplicationConfiguration applicationConfiguration,
CodecConfiguration codecConfiguration) |
JsonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ApplicationConfiguration applicationConfiguration,
CodecConfiguration codecConfiguration) |
Modifier and Type | Method and Description |
---|---|
JacksonMediaTypeCodec |
cloneWithFeatures(JacksonFeatures jacksonFeatures)
Create a new codec with the provided features.
|
cloneWithFeatures, cloneWithMapper, decode, getObjectMapper
cloneWithViewClass, decode, decode, decode, decode, decode, encode, encode, encode, encode, encode, encode, getJsonMapper, getMediaTypes, supportsType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, decode, decode, decode
public static final String CONFIGURATION_QUALIFIER
public JsonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ApplicationConfiguration applicationConfiguration, @Named(value="json") @Nullable CodecConfiguration codecConfiguration)
objectMapper
- To read/write JSONapplicationConfiguration
- The common application configurationscodecConfiguration
- The configuration for the codec@Inject public JsonMediaTypeCodec(BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, ApplicationConfiguration applicationConfiguration, @Named(value="json") @Nullable CodecConfiguration codecConfiguration)
objectMapper
- To read/write JSONapplicationConfiguration
- The common application configurationscodecConfiguration
- The configuration for the codecpublic JacksonMediaTypeCodec cloneWithFeatures(JacksonFeatures jacksonFeatures)
JacksonMediaTypeCodec
cloneWithFeatures
in class JacksonMediaTypeCodec
jacksonFeatures
- The jackson features