Annotation Interface JsonAppend.Attr
- Enclosing class:
- JsonAppend
public static @interface JsonAppend.Attr
Definition of a single attribute-backed property.
Attribute-backed properties will be appended after (or prepended before,
as per
JsonAppend.prepend()
) regular properties
in specified order, although their placement may be further changed
by the usual property-ordering functionality (alphabetic sorting;
explicit ordering)-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionWhen to include attribute-property.Name to use for serializing value of the attribute; if not defined,value()
will be used instead.Optional namespace to use; only relevant for data formats that use namespaces (like XML).boolean
Metadata about property, similar toJsonProperty.required()
.
-
Element Details
-
value
String valueName of attribute of which value to serialize. Is also used as the name of external property to write, unless overridden by assigning a value forpropName()
.
-
-
-
propName
String propNameName to use for serializing value of the attribute; if not defined,value()
will be used instead.- Default:
- ""
-
propNamespace
String propNamespaceOptional namespace to use; only relevant for data formats that use namespaces (like XML).- Default:
- ""
-
include
JsonInclude.Include includeWhen to include attribute-property. Default value indicates that property should only be written if specified attribute has a non-null value.- Default:
- NON_NULL
-
required
boolean requiredMetadata about property, similar toJsonProperty.required()
.- Default:
- false
-