public abstract class JacksonMediaTypeCodec extends MapperMediaTypeCodec
MediaTypeCodec for JSON and Jackson.
Note: will be replaced by MapperMediaTypeCodec in the future, but that class is currently experimental.| Modifier and Type | Field and Description |
|---|---|
static String |
REGULAR_JSON_MEDIA_TYPE_CODEC_NAME |
additionalTypes, applicationConfiguration, codecConfiguration, mediaType| Constructor and Description |
|---|
JacksonMediaTypeCodec(BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapperProvider,
ApplicationConfiguration applicationConfiguration,
CodecConfiguration codecConfiguration,
MediaType mediaType) |
JacksonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ApplicationConfiguration applicationConfiguration,
CodecConfiguration codecConfiguration,
MediaType mediaType) |
| Modifier and Type | Method and Description |
|---|---|
abstract JacksonMediaTypeCodec |
cloneWithFeatures(JacksonFeatures jacksonFeatures)
Create a new codec with the provided features.
|
MapperMediaTypeCodec |
cloneWithFeatures(JsonFeatures features)
Create a copy of this codec with the given features.
|
protected MapperMediaTypeCodec |
cloneWithMapper(JsonMapper mapper) |
<T> T |
decode(Argument<T> type,
com.fasterxml.jackson.databind.JsonNode node)
Decodes the given JSON node.
|
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
cloneWithViewClass, decode, decode, decode, decode, decode, encode, encode, encode, encode, encode, encode, getJsonMapper, getMediaTypes, supportsTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecode, decode, decode, decodepublic static final String REGULAR_JSON_MEDIA_TYPE_CODEC_NAME
public JacksonMediaTypeCodec(BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapperProvider, ApplicationConfiguration applicationConfiguration, CodecConfiguration codecConfiguration, MediaType mediaType)
public JacksonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ApplicationConfiguration applicationConfiguration,
CodecConfiguration codecConfiguration,
MediaType mediaType)
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public MapperMediaTypeCodec cloneWithFeatures(JsonFeatures features)
MapperMediaTypeCodecMapperMediaTypeCodec.cloneWithMapper(io.micronaut.json.JsonMapper)
instead.cloneWithFeatures in class MapperMediaTypeCodecfeatures - The features to apply.public abstract JacksonMediaTypeCodec cloneWithFeatures(JacksonFeatures jacksonFeatures)
jacksonFeatures - The jackson featuresprotected MapperMediaTypeCodec cloneWithMapper(JsonMapper mapper)
cloneWithMapper in class MapperMediaTypeCodecpublic <T> T decode(Argument<T> type, com.fasterxml.jackson.databind.JsonNode node) throws CodecException
T - The generic typetype - The typenode - The Json NodeCodecException - When object cannot be decoded