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

public @Interface JacksonXmlText

extends Annotation
Annotations
@Target:ANNOTATION_TYPE, FIELD, METHOD, PARAMETER
@Retention:RUNTIME
Imports
java.lang.annotation.*

Interface that is loosely similar to jakarta.xml.bind.annotation.XmlValue in that it can be used on one (and only one!) property of a POJO. It will result in value of the property be serialized without element wrapper, as long as there are no element-wrapped other properties (attribute-valued properties are acceptable). It is also somewhat similar to core Jackson @JsonValue annotation; but has to be separate as @JsonValue does not allow any other properties.

Note that only one such property is allowed on a POJO: if multiple properties are annotated, behavior is not defined.

Internally properties annotated will be considered to be properties with no name (that is, with marker "" (empty String)).

Method Summary

Modifier and TypeMethod and Description
public boolean
value()

Whether serialization of the property should always be done as basic XML text or not; if true, will be, if false, not.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public boolean value()

Whether serialization of the property should always be done as basic XML text or not; if true, will be, if false, not.