public final class JsonDomXPathExpressions extends Object
XPathExpression
.Modifier and Type | Method and Description |
---|---|
static <T> Optional<T> |
getJsonElement(JsonDomValue<T> jsonDomValue,
XPathExpression expression)
Evaluates the compiled XPath expression in the specified context and
optionally returns a JSON element.
|
static <T> List<T> |
getJsonElementList(JsonDomValue<T> jsonDomValue,
XPathExpression expression)
Evaluates the compiled XPath expression in the specified context and returns
a list of JSON elements.
|
public static <T> Optional<T> getJsonElement(JsonDomValue<T> jsonDomValue, XPathExpression expression) throws XPathExpressionException
See the README.md file for a description of the JSON DOM hierarchy.
T
- implementation specific JSON element typejsonDomValue
- the starting contextexpression
- the XPath expressionT
XPathExpressionException
- If the expression cannot be evaluated.public static <T> List<T> getJsonElementList(JsonDomValue<T> jsonDomValue, XPathExpression expression) throws XPathExpressionException
See the README.md file for a description of the JSON DOM hierarchy.
T
- implementation specific JSON element typejsonDomValue
- the starting contextexpression
- the XPath expressionT
XPathExpressionException
- If the expression cannot be evaluated.Copyright © 2024. All rights reserved.