Enum JSONPath.Feature

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

public static enum JSONPath.Feature extends Enum<JSONPath.Feature>
Features that can be applied to JSONPath operations
  • Enum Constant Details

    • AlwaysReturnList

      public static final JSONPath.Feature AlwaysReturnList
      Always return results as a list
    • NullOnError

      public static final JSONPath.Feature NullOnError
      Return null on error instead of throwing exceptions
    • KeepNullValue

      public static final JSONPath.Feature KeepNullValue
      Keep null values in results
    • DisableStringArrayUnwrapping

      public static final JSONPath.Feature DisableStringArrayUnwrapping
      Unwrap single-element string arrays to scalar values. When enabled, JSON arrays containing a single string element will be unwrapped to just that string value rather than returning the array. For example, ["value"] would be returned as "value".
  • Field Details

    • mask

      public final long mask
  • Method Details

    • values

      public static JSONPath.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 JSONPath.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