@Target(value={ANNOTATION_TYPE,TYPE,FIELD,METHOD,PARAMETER}) @Retention(value=RUNTIME) public @interface JsonSubTypes
JsonTypeInfo
to indicate sub-types of serializable
polymorphic types, and to associate logical names used within JSON content
(which is more portable than using physical Java class names).
Note that just annotating a property or base type with this annotation does
NOT enable polymorphic type handling: in addition, JsonTypeInfo
or equivalent (such as enabling of so-called "default typing") annotation
is needed, and only in such case is subtype information used.
Modifier and Type | Required Element and Description |
---|---|
JsonSubTypes.Type[] |
value
Subtypes of the annotated type (annotated class, or property value type
associated with the annotated method).
|
public abstract JsonSubTypes.Type[] value
Copyright © 2021 JBoss by Red Hat. All rights reserved.