@Retention(value=RUNTIME)
@Target(value={METHOD,FIELD,PARAMETER,ANNOTATION_TYPE})
public @interface JSONField
Bean,
the conversion process may not meet expectations. JSONField can not only solve this problem but also implement custom requirements.| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String[] |
alternateNames
Using multiple different field names when deserializing
|
java.lang.Class<?> |
arrayToMapDuplicateHandler |
java.lang.String |
arrayToMapKey |
java.lang.Class<?> |
contentAs |
java.lang.String |
defaultValue |
boolean |
deserialize
Whether the field is deserialized
during deserialization, default
ture |
JSONReader.Feature[] |
deserializeFeatures
Specify
JSONReader.Features to use features when deserializing |
java.lang.Class |
deserializeUsing
Specifies that
ObjectReader is used when deserializing |
java.lang.String |
format
If the field is
Date,
then please define the date format |
boolean |
jsonDirect |
java.lang.String |
label |
java.lang.String |
locale |
java.lang.String |
name
Specify the
String as the key name in JSON |
int |
ordinal
The order of the fields during
serialization and output in ascending order
|
boolean |
required
Property that indicates whether a value (which may be explicit
null) is expected for property during deserialization or not.
|
java.lang.String |
schema |
boolean |
serialize
Whether the field is serialized
during serialization, default
ture |
JSONWriter.Feature[] |
serializeFeatures
Specify
JSONWriter.Features to use features when serializing output |
java.lang.Class |
serializeUsing
Specifies that
ObjectWriter is used when serializing |
boolean |
skipTransient |
boolean |
unwrapped
If true, serialize and deserialize the field's internal properties
|
boolean |
value |
java.lang.Class |
writeUsing
Deprecated.
|
public abstract int ordinal
public abstract java.lang.String format
Date,
then please define the date formatpublic abstract boolean serialize
turepublic abstract boolean deserialize
turepublic abstract boolean unwrapped
public abstract java.lang.String[] alternateNames
@Deprecated public abstract java.lang.Class writeUsing
ObjectWriter is used when serializingpublic abstract java.lang.Class serializeUsing
ObjectWriter is used when serializingpublic abstract java.lang.Class deserializeUsing
ObjectReader is used when deserializingpublic abstract JSONReader.Feature[] deserializeFeatures
JSONReader.Features to use features when deserializingpublic abstract JSONWriter.Feature[] serializeFeatures
JSONWriter.Features to use features when serializing outputpublic abstract boolean required
ObjectReader 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).