Search in sources :

Example 1 with EvaluationAbortException

use of com.jayway.jsonpath.internal.EvaluationAbortException in project JsonPath by jayway.

the class CompiledPath method evaluate.

@Override
public EvaluationContext evaluate(Object document, Object rootDocument, Configuration configuration, boolean forUpdate) {
    if (logger.isDebugEnabled()) {
        logger.debug("Evaluating path: {}", toString());
    }
    EvaluationContextImpl ctx = new EvaluationContextImpl(this, rootDocument, configuration, forUpdate);
    try {
        PathRef op = ctx.forUpdate() ? PathRef.createRoot(rootDocument) : PathRef.NO_OP;
        root.evaluate("", op, document, ctx);
    } catch (EvaluationAbortException abort) {
    }
    ;
    return ctx;
}
Also used : EvaluationAbortException(com.jayway.jsonpath.internal.EvaluationAbortException) PathRef(com.jayway.jsonpath.internal.PathRef)

Aggregations

EvaluationAbortException (com.jayway.jsonpath.internal.EvaluationAbortException)1 PathRef (com.jayway.jsonpath.internal.PathRef)1