org.codehaus.jackson.annotate
Annotation Type JsonClass


Deprecated. As of version 1.1, use JsonDeserialize.as() instead

@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface JsonClass

Annotation that can be used with "setter" methods to indicate the actual type to use for deserializing value of the associated logical property. This is usually done if the declared type is abstract or too generic; annotation can denote actual concrete type to instantiate when deserializing the property.

The indicated type must be compatible with the declared type. For deserialization (setters) this means that it has to be a sub-type or implementation of the declared type. If this constraint is violated, an exception (usually IllegalArgumentException) can be thrown by runtime.

Note that for container types (arrays, Lists/Collections/Maps) this indicates the type of container itself; for contained Objects, use JsonContentClass instead (or for Map keys, JsonKeyClass).


Required Element Summary
 Class<?> value
          Deprecated. Class that is the type to use for deserializating value of the property associated with the annotated method.
 

Element Detail

value

public abstract Class<?> value
Deprecated. 
Class that is the type to use for deserializating value of the property associated with the annotated method.