Package com.alibaba.fastjson2.annotation
Annotation Type JSONType
-
@Retention(RUNTIME) @Target(TYPE) public @interface JSONType
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanalphabeticProperty that defines what to do regarding ordering of properties not explicitly included in annotation instance.Class<? extends JSONReader.AutoTypeBeforeHandler>autoTypeBeforeHandlerClass<?>builderJSONReader.Feature[]deserializeFeaturesSpecifyJSONReader.Features to use features when deserializingClass<?>deserializerbooleandisableReferenceDetectReduce code branches during code generation to improve performance, If it is true, there will be no code related to reference detection.StringformatString[]ignoresString[]includesStringlocalePropertyNamingStrategynamingString[]ordersOrder in which properties of annotated object are to be serialized in.StringrootNameSimilar tojavax.xml.bind.annotation.XmlRootElement, used to indicate name to use for root-level wrapping, if wrapping is enabled.StringschemaClass<?>[]seeAlsoClass<?>seeAlsoDefaultJSONWriter.Feature[]serializeFeaturesSpecifyJSONWriter.Features to use features when serializing outputClass<? extends Filter>[]serializeFiltersClass<?>serializerStringtypeKeyStringtypeNamebooleanwriteEnumAsJavaBean
-
-
-
Element Detail
-
builder
Class<?> builder
- Default:
- void.class
-
-
-
typeKey
String typeKey
- Default:
- ""
-
-
-
typeName
String typeName
- Default:
- ""
-
-
-
seeAlso
Class<?>[] seeAlso
- Default:
- {}
-
-
-
seeAlsoDefault
Class<?> seeAlsoDefault
- Since:
- 2.0.24
- Default:
- java.lang.Void.class
-
-
-
deserializeFeatures
JSONReader.Feature[] deserializeFeatures
SpecifyJSONReader.Features to use features when deserializing- Default:
- {}
-
-
-
serializeFeatures
JSONWriter.Feature[] serializeFeatures
SpecifyJSONWriter.Features to use features when serializing output- Default:
- {}
-
-
-
naming
PropertyNamingStrategy naming
- Default:
- com.alibaba.fastjson2.PropertyNamingStrategy.NeverUseThisValueExceptDefaultValue
-
-
-
ignores
String[] ignores
- Default:
- {}
-
-
-
includes
String[] includes
- Default:
- {}
-
-
-
orders
String[] orders
Order in which properties of annotated object are to be serialized in.- Default:
- {}
-
-
-
serializer
Class<?> serializer
- Default:
- java.lang.Void.class
-
-
-
deserializer
Class<?> deserializer
- Default:
- java.lang.Void.class
-
-
-
schema
String schema
- Default:
- ""
-
-
-
format
String format
- Since:
- 2.0.8
- Default:
- ""
-
-
-
locale
String locale
- Since:
- 2.0.8
- Default:
- ""
-
-
-
autoTypeBeforeHandler
Class<? extends JSONReader.AutoTypeBeforeHandler> autoTypeBeforeHandler
- Since:
- 2.0.25
- Default:
- com.alibaba.fastjson2.JSONReader.AutoTypeBeforeHandler.class
-
-
-
rootName
String rootName
Similar tojavax.xml.bind.annotation.XmlRootElement, used to indicate name to use for root-level wrapping, if wrapping is enabled. Annotation itself does not indicate that wrapping should be used; but if it is, the name used for serialization should be the name specified here, and deserializer will expect the name as well.- Since:
- 2.0.52
- Default:
- ""
-
-