Package com.fasterxml.jackson.annotation
Annotation Type JsonAlias
-
@Target({ANNOTATION_TYPE,FIELD,METHOD,PARAMETER}) @Retention(RUNTIME) public @interface JsonAlias
Annotation that can be used to define one or more alternative names for a property, accepted during deserialization as alternative to the official name. Alias information is also exposed during POJO introspection, but has no effect during serialization where primary name is always used.Examples:
public class Info { @JsonAlias({ "n", "Name" }) public String name; }
- Since:
- 2.9
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]
value
One or more secondary names to accept as aliases to the official name.
-