open class MappingJackson2XmlHttpMessageConverter : AbstractJackson2HttpMessageConverter
Implementation of org.springframework.http.converter.HttpMessageConverter that can read and write XML using Jackson 2.x extension component for reading and writing XML encoded data.
By default, this converter supports application/xml
, text/xml
, and application/*+xml
with UTF-8
character set. This can be overridden by setting the supportedMediaTypes
property.
The default constructor uses the default configuration provided by Jackson2ObjectMapperBuilder.
Compatible with Jackson 2.9 and higher, as of Spring 5.0.
Author
Sebastien Deleuze
Since
4.1
MappingJackson2XmlHttpMessageConverter()
Construct a new MappingJackson2XmlHttpMessageConverter(objectMapper: ObjectMapper)
Construct a new |
static val DEFAULT_CHARSET: Charset |
open fun setObjectMapper(objectMapper: ObjectMapper): Unit
{@inheritDoc} The |
open fun canRead(clazz: Class<*>, mediaType: MediaType): Boolean open fun canRead(type: Type, contextClass: Class<*>, mediaType: MediaType): Boolean |
|
open fun canWrite(clazz: Class<*>, mediaType: MediaType): Boolean |
|
open fun getObjectMapper(): ObjectMapper
Return the underlying |
|
open fun read(type: Type, contextClass: Class<*>, inputMessage: HttpInputMessage): Any |
|
open fun setPrettyPrint(prettyPrint: Boolean): Unit
Whether to use the DefaultPrettyPrinter when writing JSON. This is a shortcut for setting up an
|