Annotation Type JsonPolymorphicTypeMap


  • @Target(FIELD)
    @Retention(RUNTIME)
    @Beta
    public @interface JsonPolymorphicTypeMap
    Beta
    Declares that the data type enclosing this field is polymorphic, and that the value of this field in a heterogeneous JSON schema will determine what type the data should be parsed into.

    A data structure must have no more than one field with this annotation present. The annotated field's type must be considered "primitive" by Data.isPrimitive(Type). The field's value will be compared against the JsonPolymorphicTypeMap.TypeDef.key() using Object.toString().

    Since:
    1.16
    Author:
    Nick Miceli