@Target(value={ANNOTATION_TYPE,FIELD,METHOD,PARAMETER,TYPE}) @Retention(value=RUNTIME) public @interface JCardFormat
Defines settings for how a VCard
should be serialized when written to
JSON. This annotation should be used in combination with
@JsonSerialize
on getter methods that return
VCard
objects.
Example:
class Person { private VCard contact; @JsonSerialize(using = JCardSerializer.class) @JCardOptions(addProdId = false, versionStrict = false) public VCard getContact() { return contact; } //... }
Modifier and Type | Optional Element and Description |
---|---|
boolean |
addProdId
Sets whether to add a
ProductId property to the vCard that marks
it as having been generated by this library (defaults to true). |
boolean |
versionStrict
Sets whether to exclude properties that do not support vCard version 4.0
from the written vCard (defaults to true).
|
public abstract boolean versionStrict
Copyright © 2012–2023 Michael Angstadt. All rights reserved.