Class JacksonConverterRegistrar
java.lang.Object
io.micronaut.jackson.databind.convert.JacksonConverterRegistrar
- All Implemented Interfaces:
TypeConverterRegistrar
@Prototype
@Internal
public class JacksonConverterRegistrar
extends Object
implements TypeConverterRegistrar
Converter registrar for Jackson.
- Since:
- 2.0
- Author:
- graemerocher
-
Constructor Summary
ModifierConstructorDescriptionprotected
JacksonConverterRegistrar
(BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, ConversionService conversionService) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected TypeConverter<com.fasterxml.jackson.databind.node.ArrayNode,
Iterable> protected TypeConverter<com.fasterxml.jackson.databind.node.ArrayNode,
Object[]> protected TypeConverter<com.fasterxml.jackson.databind.JsonNode,
Object> protected TypeConverter<com.fasterxml.jackson.databind.node.ObjectNode,
ConvertibleValues> protected TypeConverter<Object,
com.fasterxml.jackson.databind.JsonNode> void
register
(MutableConversionService conversionService) Interface for registrars ofTypeConverter
instances.
-
Constructor Details
-
JacksonConverterRegistrar
@Inject protected JacksonConverterRegistrar(BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, ConversionService conversionService) Default constructor.- Parameters:
objectMapper
- The object mapper providerconversionService
- The conversion service
-
-
Method Details
-
register
Description copied from interface:TypeConverterRegistrar
Interface for registrars ofTypeConverter
instances.- Specified by:
register
in interfaceTypeConverterRegistrar
- Parameters:
conversionService
- TheConversionService
-
objectToJsonNodeConverter
- Returns:
- A converter that converts an object to a json node
-
objectNodeToConvertibleValuesConverter
protected TypeConverter<com.fasterxml.jackson.databind.node.ObjectNode,ConvertibleValues> objectNodeToConvertibleValuesConverter()- Returns:
- A converter that converts object nodes to convertible values
-
jsonNodeToObjectConverter
- Returns:
- The JSON node to object converter
-
arrayNodeToIterableConverter
protected TypeConverter<com.fasterxml.jackson.databind.node.ArrayNode,Iterable> arrayNodeToIterableConverter()- Returns:
- Converts array nodes to iterables.
-
arrayNodeToObjectConverter
protected TypeConverter<com.fasterxml.jackson.databind.node.ArrayNode,Object[]> arrayNodeToObjectConverter()- Returns:
- Converts array nodes to objects.
-