Package com.alibaba.fastjson2
Enum JSONPath.Feature
- All Implemented Interfaces:
Serializable,Comparable<JSONPath.Feature>,java.lang.constant.Constable
- Enclosing class:
JSONPath
Features that can be applied to JSONPath operations
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAlways return results as a listUnwrap single-element string arrays to scalar values.Keep null values in resultsReturn null on error instead of throwing exceptions -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic JSONPath.FeatureReturns the enum constant of this type with the specified name.static JSONPath.Feature[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AlwaysReturnList
Always return results as a list -
NullOnError
Return null on error instead of throwing exceptions -
KeepNullValue
Keep null values in results -
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
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
-