Enum Constant and Description |
---|
ALWAYS_RETURN_LIST
Makes this implementation more compliant to the Goessner spec.
|
AS_PATH_LIST
Returns a list of path strings representing the path of the evaluation hits
|
DEFAULT_PATH_LEAF_TO_NULL
returns
null for missing leaf. |
REQUIRE_PROPERTIES
Configures JsonPath to require properties defined in path when an
|
SUPPRESS_EXCEPTIONS
Suppress all exceptions when evaluating path.
|
Modifier and Type | Method and Description |
---|---|
static Option |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Option[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Option DEFAULT_PATH_LEAF_TO_NULL
null
for missing leaf.
[ { "foo" : "foo1", "bar" : "bar1" } { "foo" : "foo2" } ]the path : "$[*].bar" Without flag ["bar1"] is returned With flag ["bar1", null] is returned
public static final Option ALWAYS_RETURN_LIST
public static final Option AS_PATH_LIST
public static final Option SUPPRESS_EXCEPTIONS
ALWAYS_RETURN_LIST
an empty list is returned.
If an exception is thrown and the option ALWAYS_RETURN_LIST
is not present null is returned.public static final Option REQUIRE_PROPERTIES
[ { "a" : "a-val", "b" : "b-val" }, { "a" : "a-val", } ]evaluating the path "$[*].b" If REQUIRE_PROPERTIES option is present PathNotFoundException is thrown. If REQUIRE_PROPERTIES option is not present ["b-val"] is returned.
public static Option[] values()
for (Option c : Option.values()) System.out.println(c);
public static Option valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null