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 Details

    • JacksonConverterRegistrar

      @Inject protected JacksonConverterRegistrar(BeanProvider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper, ConversionService conversionService)
      Default constructor.
      Parameters:
      objectMapper - The object mapper provider
      conversionService - The conversion service
  • Method Details

    • register

      public void register(MutableConversionService conversionService)
      Description copied from interface: TypeConverterRegistrar
      Interface for registrars of TypeConverter instances.
      Specified by:
      register in interface TypeConverterRegistrar
      Parameters:
      conversionService - The ConversionService
    • objectToJsonNodeConverter

      protected TypeConverter<Object,com.fasterxml.jackson.databind.JsonNode> 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

      protected TypeConverter<com.fasterxml.jackson.databind.JsonNode,Object> 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.