Class JacksonXmlView

All Implemented Interfaces:
Aware, BeanNameAware, ApplicationContextAware, ServletContextAware, View

public class JacksonXmlView extends AbstractJacksonView
Spring MVC View that renders XML content by serializing the model for the current request using Jackson 3's XmlMapper.

The Object to be serialized is supplied as a parameter in the model. The first serializable entry is used. Users can specify a specific entry in the model via the sourceKey property.

The following special model 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
See Also:
  • Field Details

  • Constructor Details

    • JacksonXmlView

      public JacksonXmlView()
      Construct a new instance with an XmlMapper customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader) and setting the content type to application/xml.
    • JacksonXmlView

      public JacksonXmlView(tools.jackson.dataformat.xml.XmlMapper xmlMapper)
      Construct a new instance using the provided XmlMapper and setting the content type to application/xml.
  • Method Details