Package io.micronaut.jackson.codec
Class JacksonMediaTypeCodec
java.lang.Object
io.micronaut.json.codec.MapperMediaTypeCodec
io.micronaut.jackson.codec.JacksonMediaTypeCodec
- All Implemented Interfaces:
io.micronaut.http.codec.MediaTypeCodec
- Direct Known Subclasses:
JsonMediaTypeCodec
@Deprecated(forRemoval=true,
since="4.7")
public abstract class JacksonMediaTypeCodec
extends io.micronaut.json.codec.MapperMediaTypeCodec
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 MapperMediaTypeCodec in the future, but that class is currently experimental.
- Since:
- 1.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class io.micronaut.json.codec.MapperMediaTypeCodec
additionalTypes, applicationConfiguration, codecConfiguration, mediaType -
Constructor Summary
ConstructorsConstructorDescriptionJacksonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, io.micronaut.http.codec.CodecConfiguration codecConfiguration, io.micronaut.http.MediaType mediaType) Deprecated, for removal: This API element is subject to removal in a future version.JacksonMediaTypeCodec(io.micronaut.context.BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapperProvider, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, io.micronaut.http.codec.CodecConfiguration codecConfiguration, io.micronaut.http.MediaType mediaType) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionabstract JacksonMediaTypeCodeccloneWithFeatures(JacksonFeatures jacksonFeatures) Deprecated, for removal: This API element is subject to removal in a future version.Create a new codec with the provided features.io.micronaut.json.codec.MapperMediaTypeCodeccloneWithFeatures(io.micronaut.json.JsonFeatures features) Deprecated, for removal: This API element is subject to removal in a future version.protected io.micronaut.json.codec.MapperMediaTypeCodeccloneWithMapper(io.micronaut.json.JsonMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version.<T> Tdecode(io.micronaut.core.type.Argument<T> type, com.fasterxml.jackson.databind.JsonNode node) Deprecated, for removal: This API element is subject to removal in a future version.Decodes the given JSON node.com.fasterxml.jackson.databind.ObjectMapperDeprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class io.micronaut.json.codec.MapperMediaTypeCodec
cloneWithViewClass, decode, decode, decode, decode, decode, encode, encode, encode, encode, encode, encode, getJsonMapper, getMediaTypes, supportsTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.codec.MediaTypeCodec
decode, decode, decode, decode
-
Field Details
-
REGULAR_JSON_MEDIA_TYPE_CODEC_NAME
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
JacksonMediaTypeCodec
public JacksonMediaTypeCodec(io.micronaut.context.BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapperProvider, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, io.micronaut.http.codec.CodecConfiguration codecConfiguration, io.micronaut.http.MediaType mediaType) Deprecated, for removal: This API element is subject to removal in a future version. -
JacksonMediaTypeCodec
public JacksonMediaTypeCodec(com.fasterxml.jackson.databind.ObjectMapper objectMapper, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, io.micronaut.http.codec.CodecConfiguration codecConfiguration, io.micronaut.http.MediaType mediaType) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The object mapper
-
cloneWithFeatures
public io.micronaut.json.codec.MapperMediaTypeCodec cloneWithFeatures(io.micronaut.json.JsonFeatures features) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
cloneWithFeaturesin classio.micronaut.json.codec.MapperMediaTypeCodec
-
cloneWithFeatures
Deprecated, for removal: This API element is subject to removal in a future version.Create a new codec with the provided features.- Parameters:
jacksonFeatures- The jackson features- Returns:
- The new codec
-
cloneWithMapper
protected io.micronaut.json.codec.MapperMediaTypeCodec cloneWithMapper(io.micronaut.json.JsonMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
cloneWithMapperin classio.micronaut.json.codec.MapperMediaTypeCodec
-
decode
public <T> T decode(io.micronaut.core.type.Argument<T> type, com.fasterxml.jackson.databind.JsonNode node) throws io.micronaut.http.codec.CodecException Deprecated, for removal: This API element is subject to removal in a future version.Decodes the given JSON node.- Type Parameters:
T- The generic type- Parameters:
type- The typenode- The Json Node- Returns:
- The decoded object
- Throws:
io.micronaut.http.codec.CodecException- When object cannot be decoded
-