@Target(value={ANNOTATION_TYPE,FIELD,METHOD,PARAMETER})
@Retention(value=RUNTIME)
public @interface JsonProperty
Default value ("") indicates that the field name is used as the property name without any modifications, but it can be specified to non-empty value to specify different name. Property name refers to name used externally, as the field name in JSON objects.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
required
Property that indicates whether a value (which may be explicit
null) is expected for property during deserialization or not.
|
java.lang.String |
value
Defines name of the logical property, i.e.
|
public abstract java.lang.String value
public abstract boolean required
BeanDeserialized
should indicate
this as a validity problem (usually by throwing an exception,
but this may be sent via problem handlers that can try to
rectify the problem, for example, by supplying a default
value).
Note that as of 2.0, this property is NOT used by
BeanDeserializer
: support is expected to be
added for a later minor version.
Copyright © 2013. All Rights Reserved.