Top Description Methods
com.fasterxml.jackson.dataformat.xml.annotation

public @Interface JacksonXmlRootElement

extends Annotation
Annotations
@Target:ANNOTATION_TYPE, TYPE
@Retention:RUNTIME
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Annotation that can be used to define name of root element used for the root-level object when serialized, which normally uses name of the type (class). It is similar to JAXB XmlRootElement and basically an alias for standard Jackson annotation com.fasterxml.jackson.annotation.JsonRootName (which you should usually use instead).

Note that annotation has no effect on non-root elements: regular property values and so on; their name is derived from getter/setter/field, not from type itself.

Note

Since 2.4 this annotation is usually not necessary and you should use com.fasterxml.jackson.annotation.JsonRootName instead. About the only expected usage may be to have different root name for XML content than other formats.

Method Summary

Modifier and TypeMethod and Description
public String
public String
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

localNameback to summary
public String localName()
namespaceback to summary
public String namespace()