Package com.alibaba.fastjson2
Enum JSONReader.Feature
- All Implemented Interfaces:
Serializable,Comparable<JSONReader.Feature>,java.lang.constant.Constable
- Enclosing class:
- JSONReader
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionempty string "" convert to nullDeprecated.Feature that determines whether JSON integral (non-floating-point) numbers are to be deserialized intoBigIntegers if only generic type description (eitherObjectorNumber, or within untypedMaporCollectioncontext) is available.Feature that determines how "small" JSON integral (non-floating-point) numbers -- ones that fit in 32-bit signed integer (`int`) -- are bound when target type is loosely typed asObjectorNumber(or within untypedMaporCollectioncontext). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic longof(JSONReader.Feature[] features) static JSONReader.FeatureReturns the enum constant of this type with the specified name.static JSONReader.Feature[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
FieldBased
-
IgnoreNoneSerializable
-
ErrorOnNoneSerializable
- Since:
- 2.0.14
-
SupportArrayToBean
-
InitStringFieldAsEmpty
-
SupportAutoType
Deprecated.It is not safe to explicitly turn on autoType, it is recommended to use AutoTypeBeforeHandler -
SupportSmartMatch
-
UseNativeObject
-
SupportClassForName
-
IgnoreSetNullValue
-
UseDefaultConstructorAsPossible
-
UseBigDecimalForFloats
-
UseBigDecimalForDoubles
-
ErrorOnEnumNotMatch
-
TrimString
-
ErrorOnNotSupportAutoType
-
DuplicateKeyValueAsArray
-
AllowUnQuotedFieldNames
-
NonStringKeyAsString
-
Base64StringAsByteArray
- Since:
- 2.0.13
-
IgnoreCheckClose
- Since:
- 2.0.16
-
ErrorOnNullForPrimitives
- Since:
- 2.0.20
-
NullOnError
- Since:
- 2.0.20
-
IgnoreAutoTypeNotMatch
- Since:
- 2.0.21
-
NonZeroNumberCastToBooleanAsTrue
- Since:
- 2.0.24
-
IgnoreNullPropertyValue
- Since:
- 2.0.40
-
ErrorOnUnknownProperties
- Since:
- 2.0.42
-
EmptyStringAsNull
empty string "" convert to null- Since:
- 2.0.48
-
NonErrorOnNumberOverflow
- Since:
- 2.0.48
-
UseBigIntegerForInts
Feature that determines whether JSON integral (non-floating-point) numbers are to be deserialized intoBigIntegers if only generic type description (eitherObjectorNumber, or within untypedMaporCollectioncontext) is available. If enabled such values will be deserialized asBigIntegers; if disabled, will be deserialized as "smallest" available type, which is eitherInteger,LongorBigInteger, depending on number of digits.Feature is disabled by default, meaning that "untyped" integral numbers will by default be deserialized using whatever is the most compact integral type, to optimize efficiency.
- Since:
- 2.0.51
-
UseLongForInts
Feature that determines how "small" JSON integral (non-floating-point) numbers -- ones that fit in 32-bit signed integer (`int`) -- are bound when target type is loosely typed asObjectorNumber(or within untypedMaporCollectioncontext). If enabled, such values will be deserialized asLong; if disabled, they will be deserialized as "smallest" available type,Integer.Note: if
UseBigIntegerForIntsis enabled, it has precedence over this setting, forcing use ofBigIntegerfor all integral values.Feature is disabled by default, meaning that "untyped" integral numbers will by default be deserialized using
Integerif value fits.- Since:
- 2.0.51
-
-
Field Details
-
mask
public final long mask
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
of
-