Enum JSONReader.Feature

java.lang.Object
java.lang.Enum<JSONReader.Feature>
com.alibaba.fastjson2.JSONReader.Feature
All Implemented Interfaces:
Serializable, Comparable<JSONReader.Feature>, java.lang.constant.Constable
Enclosing class:
JSONReader

public static enum JSONReader.Feature extends Enum<JSONReader.Feature>
  • Enum Constant Details

    • FieldBased

      public static final JSONReader.Feature FieldBased
    • IgnoreNoneSerializable

      public static final JSONReader.Feature IgnoreNoneSerializable
    • ErrorOnNoneSerializable

      public static final JSONReader.Feature ErrorOnNoneSerializable
      Since:
      2.0.14
    • SupportArrayToBean

      public static final JSONReader.Feature SupportArrayToBean
    • InitStringFieldAsEmpty

      public static final JSONReader.Feature InitStringFieldAsEmpty
    • SupportAutoType

      @Deprecated public static final JSONReader.Feature SupportAutoType
      Deprecated.
      It is not safe to explicitly turn on autoType, it is recommended to use AutoTypeBeforeHandler
    • SupportSmartMatch

      public static final JSONReader.Feature SupportSmartMatch
    • UseNativeObject

      public static final JSONReader.Feature UseNativeObject
    • SupportClassForName

      public static final JSONReader.Feature SupportClassForName
    • IgnoreSetNullValue

      public static final JSONReader.Feature IgnoreSetNullValue
    • UseDefaultConstructorAsPossible

      public static final JSONReader.Feature UseDefaultConstructorAsPossible
    • UseBigDecimalForFloats

      public static final JSONReader.Feature UseBigDecimalForFloats
    • UseBigDecimalForDoubles

      public static final JSONReader.Feature UseBigDecimalForDoubles
    • ErrorOnEnumNotMatch

      public static final JSONReader.Feature ErrorOnEnumNotMatch
    • TrimString

      public static final JSONReader.Feature TrimString
    • ErrorOnNotSupportAutoType

      public static final JSONReader.Feature ErrorOnNotSupportAutoType
    • DuplicateKeyValueAsArray

      public static final JSONReader.Feature DuplicateKeyValueAsArray
    • AllowUnQuotedFieldNames

      public static final JSONReader.Feature AllowUnQuotedFieldNames
    • NonStringKeyAsString

      public static final JSONReader.Feature NonStringKeyAsString
    • Base64StringAsByteArray

      public static final JSONReader.Feature Base64StringAsByteArray
      Since:
      2.0.13
    • IgnoreCheckClose

      public static final JSONReader.Feature IgnoreCheckClose
      Since:
      2.0.16
    • ErrorOnNullForPrimitives

      public static final JSONReader.Feature ErrorOnNullForPrimitives
      Since:
      2.0.20
    • NullOnError

      public static final JSONReader.Feature NullOnError
      Since:
      2.0.20
    • IgnoreAutoTypeNotMatch

      public static final JSONReader.Feature IgnoreAutoTypeNotMatch
      Since:
      2.0.21
    • NonZeroNumberCastToBooleanAsTrue

      public static final JSONReader.Feature NonZeroNumberCastToBooleanAsTrue
      Since:
      2.0.24
    • IgnoreNullPropertyValue

      public static final JSONReader.Feature IgnoreNullPropertyValue
      Since:
      2.0.40
    • ErrorOnUnknownProperties

      public static final JSONReader.Feature ErrorOnUnknownProperties
      Since:
      2.0.42
    • EmptyStringAsNull

      public static final JSONReader.Feature EmptyStringAsNull
      empty string "" convert to null
      Since:
      2.0.48
    • NonErrorOnNumberOverflow

      public static final JSONReader.Feature NonErrorOnNumberOverflow
      Since:
      2.0.48
    • UseBigIntegerForInts

      public static final JSONReader.Feature UseBigIntegerForInts
      Feature that determines whether JSON integral (non-floating-point) numbers are to be deserialized into BigIntegers if only generic type description (either Object or Number, or within untyped Map or Collection context) is available. If enabled such values will be deserialized as BigIntegers; if disabled, will be deserialized as "smallest" available type, which is either Integer, Long or BigInteger, 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

      public static final JSONReader.Feature 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 as Object or Number (or within untyped Map or Collection context). If enabled, such values will be deserialized as Long; if disabled, they will be deserialized as "smallest" available type, Integer.

      Note: if UseBigIntegerForInts is enabled, it has precedence over this setting, forcing use of BigInteger for all integral values.

      Feature is disabled by default, meaning that "untyped" integral numbers will by default be deserialized using Integer if value fits.

      Since:
      2.0.51
  • Field Details

    • mask

      public final long mask
  • Method Details

    • values

      public static JSONReader.Feature[] 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

      public static JSONReader.Feature valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • of

      public static long of(JSONReader.Feature[] features)