Class JacksonYamlHttpMessageConverter

All Implemented Interfaces:
HttpMessageConverter<Object>, SmartHttpMessageConverter<Object>

public class JacksonYamlHttpMessageConverter extends AbstractJacksonHttpMessageConverter<tools.jackson.dataformat.yaml.YAMLMapper>
Implementation of HttpMessageConverter that can read and write the YAML data format using the dedicated Jackson 3.x extension.

By default, this converter supports the MediaType.APPLICATION_YAML_VALUE media type. This can be overridden by setting the supportedMediaTypes property.

The following hints entries are supported:

  • A JSON view with a "com.fasterxml.jackson.annotation.JsonView" key and the class name of the JSON view as value.
  • A filter provider with a "tools.jackson.databind.ser.FilterProvider" key and the filter provider class name as value.
Since:
7.0
Author:
Sebastien Deleuze
  • Constructor Details

    • JacksonYamlHttpMessageConverter

      public JacksonYamlHttpMessageConverter()
      Construct a new instance with a YAMLMapper customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
    • JacksonYamlHttpMessageConverter

      public JacksonYamlHttpMessageConverter(tools.jackson.dataformat.yaml.YAMLMapper.Builder builder)
      Construct a new instance with the provided YAMLMapper.
      See Also:
      • YAMLMapper.builder()
    • JacksonYamlHttpMessageConverter

      public JacksonYamlHttpMessageConverter(tools.jackson.dataformat.yaml.YAMLMapper mapper)
      Construct a new instance with the provided YAMLMapper.Builder customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
      See Also:
      • YAMLMapper.builder()