@Named(value="json") @Singleton public class JsonMediaTypeCodec extends JacksonMediaTypeCodec
MediaTypeCodec
for JSON and Jackson.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIGURATION_QUALIFIER |
additionalTypes, applicationConfiguration, codecConfiguration, mediaType
Constructor and Description |
---|
JsonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ApplicationConfiguration applicationConfiguration,
CodecConfiguration codecConfiguration) |
JsonMediaTypeCodec(javax.inject.Provider<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.
|
decode, decode, decode, decode, encode, encode, encode, getMediaTypes, getObjectMapper, supportsType
public static final java.lang.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(javax.inject.Provider<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