public class XmlMapper
extends com.fasterxml.jackson.databind.ObjectMapper
ObjectMapper
that will read and write XML instead of JSON,
using XML-backed JsonFactory
implementation (XmlFactory
).
Mapper itself overrides some aspects of functionality to try to handle data binding aspects as similar to JAXB as possible.
Modifier and Type | Field and Description |
---|---|
protected JacksonXmlModule |
_xmlModule |
protected static JacksonXmlModule |
DEFAULT_XML_MODULE |
_defaultPrettyPrinter, _deserializationConfig, _deserializationContext, _injectableValues, _jsonFactory, _mixInAnnotations, _rootDeserializers, _rootNames, _serializationConfig, _serializerFactory, _serializerProvider, _subtypeResolver, _typeFactory, DEFAULT_ANNOTATION_INTROSPECTOR, DEFAULT_BASE, DEFAULT_INTROSPECTOR, STD_VISIBILITY_CHECKER
Constructor and Description |
---|
XmlMapper() |
XmlMapper(JacksonXmlModule module) |
XmlMapper(XmlFactory xmlFactory) |
XmlMapper(XmlFactory xmlFactory,
JacksonXmlModule module) |
Modifier and Type | Method and Description |
---|---|
protected com.fasterxml.jackson.core.PrettyPrinter |
_defaultPrettyPrinter()
XML indentation differs from JSON indentation, thereby
need to change default pretty-printer
|
com.fasterxml.jackson.databind.ObjectMapper |
configure(FromXmlParser.Feature f,
boolean state) |
com.fasterxml.jackson.databind.ObjectMapper |
configure(ToXmlGenerator.Feature f,
boolean state) |
XmlMapper |
copy() |
com.fasterxml.jackson.databind.ObjectMapper |
disable(FromXmlParser.Feature f) |
com.fasterxml.jackson.databind.ObjectMapper |
disable(ToXmlGenerator.Feature f) |
com.fasterxml.jackson.databind.ObjectMapper |
enable(FromXmlParser.Feature f) |
com.fasterxml.jackson.databind.ObjectMapper |
enable(ToXmlGenerator.Feature f) |
XmlFactory |
getFactory() |
XmlFactory |
getJsonFactory()
Deprecated.
Since 2.1, use
getFactory() instead |
protected void |
setXMLTextElementName(String name)
Method called by
JacksonXmlModule to pass configuration
information to XmlFactory , during registration. |
com.fasterxml.jackson.core.Version |
version() |
_checkInvalidCopy, _configAndWriteValue, _configAndWriteValue, _convert, _findRootDeserializer, _initForReading, _readMapAndClose, _readValue, _serializerProvider, _unwrapAndDeserialize, _verifySchemaType, acceptJsonFormatVisitor, acceptJsonFormatVisitor, addHandler, addMixInAnnotations, canDeserialize, canDeserialize, canSerialize, canSerialize, clearProblemHandlers, configure, configure, configure, configure, configure, constructType, convertValue, convertValue, convertValue, createArrayNode, createDeserializationContext, createObjectNode, disable, disable, disable, disable, disable, disableDefaultTyping, enable, enable, enable, enable, enable, enableDefaultTyping, enableDefaultTyping, enableDefaultTyping, enableDefaultTypingAsProperty, findAndRegisterModules, findMixInClassFor, findModules, findModules, generateJsonSchema, getDeserializationConfig, getDeserializationContext, getNodeFactory, getSerializationConfig, getSerializerFactory, getSerializerProvider, getSubtypeResolver, getTypeFactory, getVisibilityChecker, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, mixInCount, reader, reader, reader, reader, reader, reader, reader, reader, reader, reader, reader, readerForUpdating, readerWithView, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValues, readValues, readValues, readValues, registerModule, registerModules, registerModules, registerSubtypes, registerSubtypes, setAnnotationIntrospector, setAnnotationIntrospectors, setBase64Variant, setDateFormat, setDefaultTyping, setFilters, setHandlerInstantiator, setInjectableValues, setLocale, setMixInAnnotations, setNodeFactory, setPropertyNamingStrategy, setSerializationInclusion, setSerializerFactory, setSerializerProvider, setSubtypeResolver, setTimeZone, setTypeFactory, setVisibility, setVisibilityChecker, treeAsTokens, treeToValue, valueToTree, writer, writer, writer, writer, writer, writer, writer, writer, writer, writer, writerWithDefaultPrettyPrinter, writerWithType, writerWithType, writerWithType, writerWithView, writeTree, writeTree, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString
protected static final JacksonXmlModule DEFAULT_XML_MODULE
protected final JacksonXmlModule _xmlModule
public XmlMapper()
public XmlMapper(XmlFactory xmlFactory)
public XmlMapper(JacksonXmlModule module)
public XmlMapper(XmlFactory xmlFactory, JacksonXmlModule module)
public XmlMapper copy()
copy
in class com.fasterxml.jackson.databind.ObjectMapper
public com.fasterxml.jackson.core.Version version()
version
in interface com.fasterxml.jackson.core.Versioned
version
in class com.fasterxml.jackson.databind.ObjectMapper
protected void setXMLTextElementName(String name)
JacksonXmlModule
to pass configuration
information to XmlFactory
, during registration.@Deprecated public XmlFactory getJsonFactory()
getFactory()
insteadgetJsonFactory
in class com.fasterxml.jackson.databind.ObjectMapper
public XmlFactory getFactory()
getFactory
in class com.fasterxml.jackson.databind.ObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper configure(ToXmlGenerator.Feature f, boolean state)
public com.fasterxml.jackson.databind.ObjectMapper configure(FromXmlParser.Feature f, boolean state)
public com.fasterxml.jackson.databind.ObjectMapper enable(ToXmlGenerator.Feature f)
public com.fasterxml.jackson.databind.ObjectMapper enable(FromXmlParser.Feature f)
public com.fasterxml.jackson.databind.ObjectMapper disable(ToXmlGenerator.Feature f)
public com.fasterxml.jackson.databind.ObjectMapper disable(FromXmlParser.Feature f)
protected com.fasterxml.jackson.core.PrettyPrinter _defaultPrettyPrinter()
_defaultPrettyPrinter
in class com.fasterxml.jackson.databind.ObjectMapper
Copyright © 2012–2014 FasterXML. All rights reserved.