Annotation Interface JsonXmlCollection
This annotation must be used with the JsonXmlCollectionModule.
The module is registered automatically for XML source if you are using
BeanMapper.
Use this annotation only when you wish to overwrite default settings
via its attributes. It is otherwise of no use.
- Since:
- 3.0.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?> Concrete type to use when deserializing.Field name to use for each collection element when serializing as XML.
-
Element Details
-
entryName
String entryNameField name to use for each collection element when serializing as XML. This name does not affect reading. The default behavior uses basic heuristics to detect whether the collection property name is plural and can make a singular variant of it. It it can't figure it out, it falls back to "entry". Given the plural detection logic's simplicity, it won't always get it right. Use this attribute to ensure the exact name you want.- Returns:
- entry field name, when writing XML
- Default:
""
-
concreteType
Class<?> concreteTypeConcrete type to use when deserializing. Has to be assignable to the type of your collection property. Default will try to detect and useHashSetfor aSet, andArrayListfor aList.- Returns:
- collection concrete type
- Default:
java.lang.Void.class
-