Top Description Inners Methods
com.fasterxml.jackson.databind.annotation

public @Interface JsonAppend

extends Annotation
Annotations
@Target:ANNOTATION_TYPE, TYPE
@Retention:RUNTIME
@JacksonAnnotation
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target, com.fasterxml.jackson.annotation.JsonInclude, com.fasterxml.jackson.databind.ser.VirtualBeanPropertyWriter

Annotation used to add "virtual" properties that will be written after regular properties during serialization.

Please note that the "virtual" properties added using this annotation do not obey any specific order, including the order defined by com.fasterxml.jackson.annotation.JsonPropertyOrder.

Since
2.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static @interface
JsonAppend.Attr

Definition of a single attribute-backed property.

public static @interface
JsonAppend.Prop

Definition of a single general virtual property.

Method Summary

Modifier and TypeMethod and Description
public JsonAppend.Attr[]
attrs()

Set of attribute-backed properties to include when serializing a POJO.

public boolean
prepend()

Indicator used to determine whether properties defined are to be appended after (false) or prepended before (true) regular properties.

public JsonAppend.Prop[]
props()

Set of general virtual properties to include when serializing a POJO.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

attrsback to summary
public JsonAppend.Attr[] attrs()

Set of attribute-backed properties to include when serializing a POJO.

prependback to summary
public boolean prepend()

Indicator used to determine whether properties defined are to be appended after (false) or prepended before (true) regular properties. Affects all kinds of properties defined using this annotation.

propsback to summary
public JsonAppend.Prop[] props()

Set of general virtual properties to include when serializing a POJO.

com.fasterxml.jackson.databind.annotation back to summary

public @Interface JsonAppend.Attr

extends Annotation

Definition of a single attribute-backed property. Attribute-backed properties will be appended after (or prepended before, as per prepend) regular properties in specified order, although their placement may be further changed by the usual property-ordering functionality (alphabetic sorting; explicit ordering)

Method Summary

Modifier and TypeMethod and Description
public JsonInclude.Include
include()

When to include attribute-property.

public String
propName()

Name to use for serializing value of the attribute; if not defined, value will be used instead.

public String
propNamespace()

Optional namespace to use; only relevant for data formats that use namespaces (like XML).

public boolean
public String
value()

Name of attribute of which value to serialize.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

includeback to summary
public JsonInclude.Include include()

When to include attribute-property. Default value indicates that property should only be written if specified attribute has a non-null value.

propNameback to summary
public String propName()

Name to use for serializing value of the attribute; if not defined, value will be used instead.

propNamespaceback to summary
public String propNamespace()

Optional namespace to use; only relevant for data formats that use namespaces (like XML).

requiredback to summary
public boolean required()

Metadata about property, similar to com.fasterxml.jackson.annotation.JsonProperty#required().

valueback to summary
public String value()

Name of attribute of which value to serialize. Is also used as the name of external property to write, unless overridden by assigning a value for propName().

com.fasterxml.jackson.databind.annotation back to summary

public @Interface JsonAppend.Prop

extends Annotation

Definition of a single general virtual property.

Method Summary

Modifier and TypeMethod and Description
public JsonInclude.Include
include()

When to include value of the property.

public String
name()

Name of the property to possibly use for serializing (although implementation may choose to not use this information).

public String
namespace()

Optional namespace to use along with name; only relevant for data formats that use namespaces (like XML).

public boolean
public Class<?>
type()

Nominal type of the property.

public Class<? extends VirtualBeanPropertyWriter>
value()

Actual implementation class (a subtype of VirtualBeanPropertyWriter) of the property to instantiate (using the no-argument default constructor).

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

includeback to summary
public JsonInclude.Include include()

When to include value of the property. Default value indicates that property should only be written if specified attribute has a non-null value. As with other properties, actual property implementation may or may not choose to use this inclusion information.

nameback to summary
public String name()

Name of the property to possibly use for serializing (although implementation may choose to not use this information).

namespaceback to summary
public String namespace()

Optional namespace to use along with name; only relevant for data formats that use namespaces (like XML).

requiredback to summary
public boolean required()

Metadata about property, similar to com.fasterxml.jackson.annotation.JsonProperty#required().

typeback to summary
public Class<?> type()

Nominal type of the property. Passed as type information for related virtual objects, and may (or may not be) used by implementation for choosing serializer to use.

valueback to summary
public Class<? extends VirtualBeanPropertyWriter> value()

Actual implementation class (a subtype of VirtualBeanPropertyWriter) of the property to instantiate (using the no-argument default constructor).