Annotation Interface JsonTypeIdResolver
@Target({ANNOTATION_TYPE,METHOD,FIELD,TYPE,PARAMETER})
@Retention(RUNTIME)
public @interface JsonTypeIdResolver
Annotation that can be used to plug a custom type identifier handler
(
TypeIdResolver
)
to be used by
TypeSerializer
s
and TypeDeserializer
s
for converting between java types and type id included in JSON content.
In simplest cases this can be a simple class with static mapping between
type names and matching classes.
NOTE: since 2.4, applicable to properties as well (should have been long time ago, but problem only found then)
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionClass<? extends TypeIdResolver>
Defines implementation class ofTypeIdResolver
to use for converting between external type id (type name) and actual type of object.
-
Element Details
-
value
Class<? extends TypeIdResolver> valueDefines implementation class ofTypeIdResolver
to use for converting between external type id (type name) and actual type of object.
-