public class JsonPathExpression extends Object
JsonPath expression.| Modifier and Type | Field and Description |
|---|---|
static JsonPathExpression |
ROOT
A pre-compiled
JsonPathExpression that represents the root element of a JSON
document ('$'). |
| Constructor and Description |
|---|
JsonPathExpression(String expression)
Creates a compiled
JsonPathExpression from the specified expression. |
| Modifier and Type | Method and Description |
|---|---|
JsonPathExpression |
append(String expression)
Produces a new
JsonPathExpression with the concatenation result of this
JsonPathExpression and the given expression. |
JsonPathExpression |
appendChild(String name)
Produces a new
JsonPathExpression with the concatenation result of this
JsonPathExpression and the given child element name. |
boolean |
equals(Object other) |
int |
hashCode() |
String |
toString()
Returns the string representation of this
JsonPathExpression, in the
bracket-notation. |
public static final JsonPathExpression ROOT
JsonPathExpression that represents the root element of a JSON
document ('$').public JsonPathExpression(String expression)
JsonPathExpression from the specified expression.expression - the JsonPath expression to compileIllegalArgumentException - if the specified expression is null or emptycom.jayway.jsonpath.InvalidPathException - if the specified JsonPath expression is invalidpublic JsonPathExpression appendChild(String name)
JsonPathExpression with the concatenation result of this
JsonPathExpression and the given child element name.name - the child name to be appended to the end of this JsonPathExpressionJsonPathExpressioncom.jayway.jsonpath.InvalidPathException - if the resulting JsonPath expression is invalidpublic JsonPathExpression append(String expression)
JsonPathExpression with the concatenation result of this
JsonPathExpression and the given expression.expression - a String representing the expression to be appended to the
end of this JsonPathExpressionJsonPathExpressioncom.jayway.jsonpath.InvalidPathException - if the resulting JsonPath expression is invalidpublic String toString()
JsonPathExpression, in the
bracket-notation. For example: $['store']['book'][0]['title']Copyright © 2022. All rights reserved.