Annotation Type JsonProperty
-
@Target({METHOD,PARAMETER,FIELD}) @Retention(RUNTIME) @Inherited @Documented public @interface JsonProperty
JsonProperty annotation can be used to define the name of a property. You can apply it on fields and methods. In that case this name will be used instead of the conventional one computed from the signature. You can also use this annotation on parameters of creator methods and on constructor parameters. In that case Genson during deserialization will try to use those names to match the properties from the json stream. By default it is used inAnnotationPropertyNameResolver.- Author:
- Eugen Cepoi
- See Also:
AnnotationPropertyNameResolver,JsonCreator,JsonIgnore
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]aliasesA list of aliases to use during deserialization for this property.booleandeserializeWhether this property must be deserialized.booleanserializeWhether this property must be serialized.StringvalueThe name of that property.
-