com.fasterxml.jackson.xml
Class XmlMapper

java.lang.Object
  extended by org.codehaus.jackson.ObjectCodec
      extended by org.codehaus.jackson.map.ObjectMapper
          extended by com.fasterxml.jackson.xml.XmlMapper
All Implemented Interfaces:
org.codehaus.jackson.Versioned

public class XmlMapper
extends org.codehaus.jackson.map.ObjectMapper

Customized 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.

Since:
1.7

Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.ObjectMapper
org.codehaus.jackson.map.ObjectMapper.DefaultTypeResolverBuilder, org.codehaus.jackson.map.ObjectMapper.DefaultTyping
 
Field Summary
 
Fields inherited from class org.codehaus.jackson.map.ObjectMapper
_deserializationConfig, _deserializerProvider, _jsonFactory, _rootDeserializers, _serializationConfig, _serializerFactory, _serializerProvider, _subtypeResolver, _typeFactory, DEFAULT_ANNOTATION_INTROSPECTOR, DEFAULT_INTROSPECTOR, STD_VISIBILITY_CHECKER
 
Constructor Summary
XmlMapper()
           
XmlMapper(XmlFactory xmlFactory)
           
 
Method Summary
protected  org.codehaus.jackson.PrettyPrinter _defaultPrettyPrinter()
          XML indentation differs from JSON indentation, thereby need to change default pretty-printer
 org.codehaus.jackson.map.ObjectMapper configure(FromXmlParser.Feature f, boolean state)
           
 org.codehaus.jackson.map.ObjectMapper configure(ToXmlGenerator.Feature f, boolean state)
           
 org.codehaus.jackson.Version version()
          Method that will return version information stored in and read from jar that contains this class.
 
Methods inherited from class org.codehaus.jackson.map.ObjectMapper
_configAndWriteValue, _configAndWriteValue, _convert, _createDeserializationContext, _findRootDeserializer, _initForReading, _readMapAndClose, _readValue, canDeserialize, canSerialize, configure, configure, configure, configure, constructType, convertValue, convertValue, convertValue, copyDeserializationConfig, copySerializationConfig, createArrayNode, createObjectNode, defaultPrettyPrintingWriter, disableDefaultTyping, enableDefaultTyping, enableDefaultTyping, enableDefaultTyping, enableDefaultTypingAsProperty, filteredWriter, generateJsonSchema, generateJsonSchema, getDeserializationConfig, getDeserializerProvider, getJsonFactory, getNodeFactory, getSerializationConfig, getSerializerProvider, getSubtypeResolver, getTypeFactory, getVisibilityChecker, prettyPrintingWriter, reader, reader, reader, reader, reader, 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, readValue, readValue, readValue, readValue, readValue, readValues, readValues, readValues, registerModule, registerSubtypes, registerSubtypes, schemaBasedReader, schemaBasedWriter, setAnnotationIntrospector, setDateFormat, setDefaultTyping, setDeserializationConfig, setDeserializerProvider, setFilters, setHandlerInstantiator, setNodeFactory, setPropertyNamingStrategy, setSerializationConfig, setSerializerFactory, setSerializerProvider, setSubtypeResolver, setTypeFactory, setVisibilityChecker, treeAsTokens, treeToValue, typedWriter, typedWriter, typedWriter, updatingReader, valueToTree, viewWriter, withModule, writer, writeTree, writeTree, writeValue, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString, writeValueUsingView, writeValueUsingView, writeValueUsingView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlMapper

public XmlMapper()

XmlMapper

public XmlMapper(XmlFactory xmlFactory)
Method Detail

version

public org.codehaus.jackson.Version version()
Method that will return version information stored in and read from jar that contains this class.

Specified by:
version in interface org.codehaus.jackson.Versioned
Overrides:
version in class org.codehaus.jackson.map.ObjectMapper

configure

public org.codehaus.jackson.map.ObjectMapper configure(ToXmlGenerator.Feature f,
                                                       boolean state)

configure

public org.codehaus.jackson.map.ObjectMapper configure(FromXmlParser.Feature f,
                                                       boolean state)

_defaultPrettyPrinter

protected org.codehaus.jackson.PrettyPrinter _defaultPrettyPrinter()
XML indentation differs from JSON indentation, thereby need to change default pretty-printer

Overrides:
_defaultPrettyPrinter in class org.codehaus.jackson.map.ObjectMapper


Copyright © 2011 fasterxml.com. All Rights Reserved.