ObjectMapper that will read and write XML instead of JSON,
using XML-backed com.fasterxml.jackson.core.JsonFactory
implementation (XmlFactory).
Mapper itself overrides some aspects of functionality to try to handle data binding aspects as similar to JAXB as possible.
Note that most of configuration should be done by pre-constructing
JacksonXmlModule explicitly, instead of relying on default settings.
| Modifier and Type | Class and Description |
|---|---|
| public static class | XmlMapper.
Builder implementation for constructing |
| Modifier and Type | Field and Description |
|---|---|
| protected final JacksonXmlModule | |
| protected static final JacksonXmlModule | |
| protected static final DefaultXmlPrettyPrinter | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected TypeResolverBuilder | _constructDefaultTypeResolverBuilder(ObjectMapper.
Overrides com. Overridable factory method, separate to allow format-specific mappers (and specifically
XML-backed one, currently) to offer custom |
| public static XmlMapper. | |
| public static XmlMapper. | |
| public ObjectMapper | |
| public ObjectMapper | |
| public XmlMapper | copy()
Overrides com. Method for creating a new |
| public ToXmlGenerator | createGenerator(XMLStreamWriter w)
Overloaded variant that allows constructing |
| public FromXmlParser | createParser(XMLStreamReader r)
Overloaded variant that allows constructing |
| public ObjectMapper | |
| public ObjectMapper | |
| public ObjectMapper | |
| public ObjectMapper | |
| public XmlFactory | getFactory()
Overrides com. Accessor for finding underlying data format factory
( |
| public <T> T | readValue(XMLStreamReader r, Class<T> valueType)
Method for reading a single XML value from given XML-specific input
source; useful for incremental data-binding, combining traversal using
basic Stax |
| public <T> T | readValue(XMLStreamReader r, TypeReference<T> valueTypeRef)
Method for reading a single XML value from given XML-specific input
source; useful for incremental data-binding, combining traversal using
basic Stax |
| public <T> T | readValue(XMLStreamReader r, JavaType valueType)
Method for reading a single XML value from given XML-specific input
source; useful for incremental data-binding, combining traversal using
basic Stax |
| public XmlMapper | setDefaultUseWrapper(boolean state)
Deprecated
Since 2.10 use
Builder#defaultUseWrapper(boolean) instead
Since 2.7 |
| public void | |
| protected void | setXMLTextElementName(String name)
Deprecated
Since 2.10 use
Builder#nameForTextElement(String) instead
Method called by |
| public Version | version()
Overrides com. Implements com. Method that will return version information stored in and read from jar that contains this class. |
| public void | writeValue(XMLStreamWriter w, Object value)
Method for serializing given value using specific |
| public static XmlMapper. |