Annotation Type JsonProperty
@Target({ANNOTATION_TYPE,FIELD,METHOD,PARAMETER})
@Retention(RUNTIME)
public @interface JsonProperty
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
-
from
-
to
-
required
boolean required- Returns:
- used in decoding only, the field must present in the JSON, regardless null or not
- Default:
false
-
decoder
-
implementation
Class<?> implementation- Returns:
- used in decoding only, choose concrete class for interface/abstract type
- Default:
java.lang.Object.class
-
encoder
-
nullable
boolean nullable- Returns:
- used in encoding only, should check null for this field, skip null checking will make encoding faster
- Default:
true
-
collectionValueNullable
boolean collectionValueNullable- Returns:
- used in encoding only, should check null for the value, if it is collection, skip null checking will make encoding faster
- Default:
true
-
defaultValueToOmit
String defaultValueToOmit- Returns:
- the default value to omit null, to omit null value \"xxx\", to omit string value 123, to omit number void, to always encode this field, ignore global config
- Default:
""
-