Class MappingJackson2YamlHttpMessageConverter

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

public class MappingJackson2YamlHttpMessageConverter extends AbstractJackson2HttpMessageConverter
Implementation of HttpMessageConverter that can read and write the YAML data format using the dedicated Jackson 2.x extension.

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

The default constructor uses the default configuration provided by Jackson2ObjectMapperBuilder.

Since:
6.2
Author:
Hyoungjune Kim
  • Constructor Details

    • MappingJackson2YamlHttpMessageConverter

      public MappingJackson2YamlHttpMessageConverter()
      Construct a new MappingJackson2YamlHttpMessageConverter using the default configuration provided by Jackson2ObjectMapperBuilder.
    • MappingJackson2YamlHttpMessageConverter

      public MappingJackson2YamlHttpMessageConverter(ObjectMapper objectMapper)
      Construct a new MappingJackson2YamlHttpMessageConverter with a custom ObjectMapper (must be configured with a YAMLFactory instance).

      You can use Jackson2ObjectMapperBuilder to build it easily.

      See Also:
  • Method Details