Package jakarta.json.bind.annotation
Annotation Type JsonbTypeInfo
-
@JsonbAnnotation @Retention(RUNTIME) @Target({ANNOTATION_TYPE,TYPE}) public @interface JsonbTypeInfo
Configuration annotation of the type information handling.
This annotation is required on the most common parent of all classes when type information will be applied.
This annotation is tightly bound to// Example @JsonbTypeInfo(key = "@key") interface Animal {} class Dog implements Animal {} class Cat implements Animal {}
JsonbSubtype
. It is required to useJsonbSubtype
annotations to specify all the possible classes and their aliases.
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.String
DEFAULT_KEY_NAME
Default type information key name.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
key
Key used for keeping the type information (alias).JsonbSubtype[]
value
Allowed aliases of the handled type.
-
-
-
-
value
JsonbSubtype[] value
Allowed aliases of the handled type.- Returns:
- list of allowed aliases
- Default:
- {}
-
-