Annotation Type JsonTypeResolver


  • @Target({ANNOTATION_TYPE,METHOD,FIELD,TYPE,PARAMETER})
    @Retention(RUNTIME)
    public @interface JsonTypeResolver
    Annotation that can be used to explicitly define custom resolver used for handling serialization and deserialization of type information, needed for handling of polymorphic types (or sometimes just for linking abstract types to concrete types)

    NOTE: since 2.4, applicable to properties as well (should have been long time ago, but problem only found then)

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.Class<? extends TypeResolverBuilder<?>> value
      Defines implementation class of TypeResolverBuilder which is used to construct actual TypeDeserializer and TypeDeserializer instances that handle reading and writing addition type information needed to support polymorphic deserialization.