Class JacksonYamlHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
org.springframework.http.converter.AbstractSmartHttpMessageConverter<Object>
org.springframework.http.converter.AbstractJacksonHttpMessageConverter<tools.jackson.dataformat.yaml.YAMLMapper>
org.springframework.http.converter.yaml.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
-
Field Summary
Fields inherited from class AbstractJacksonHttpMessageConverter
defaultMapperFields inherited from class AbstractHttpMessageConverter
logger -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance with aYAMLMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).JacksonYamlHttpMessageConverter(tools.jackson.dataformat.yaml.YAMLMapper mapper) Construct a new instance with the providedYAMLMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).JacksonYamlHttpMessageConverter(tools.jackson.dataformat.yaml.YAMLMapper.Builder builder) Construct a new instance with the providedYAMLMapper. -
Method Summary
Methods inherited from class AbstractJacksonHttpMessageConverter
canRead, canWrite, customizeReader, customizeWriter, getCharset, getJavaType, getJsonEncoding, getMapper, getMappersForType, getMediaTypesForProblemDetail, getSupportedMediaTypes, read, readInternal, registerMappersForType, setSupportedMediaTypes, supportsRepeatableWrites, writeInternal, writePrefix, writeSuffixMethods inherited from class AbstractSmartHttpMessageConverter
canWrite, supports, write, writeInternalMethods inherited from class AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HttpMessageConverter
getSupportedMediaTypesMethods inherited from interface SmartHttpMessageConverter
canRead, read, write
-
Constructor Details
-
JacksonYamlHttpMessageConverter
public JacksonYamlHttpMessageConverter()Construct a new instance with aYAMLMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader). -
JacksonYamlHttpMessageConverter
public JacksonYamlHttpMessageConverter(tools.jackson.dataformat.yaml.YAMLMapper.Builder builder) Construct a new instance with the providedYAMLMapper.- See Also:
-
JacksonYamlHttpMessageConverter
public JacksonYamlHttpMessageConverter(tools.jackson.dataformat.yaml.YAMLMapper mapper) Construct a new instance with the providedYAMLMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).- See Also:
-