All Implemented Interfaces:
Evaluator<String>
Direct Known Subclasses:
JsonPathAddEvaluator, JsonPathPutEvaluator, JsonPathSetEvaluator

public abstract class JsonPathUpdateEvaluator extends JsonPathBaseEvaluator
JsonPathUpdateEvaluator is base class for updating attributes Subclasses need to implement updateAttribute(com.jayway.jsonpath.DocumentContext, com.jayway.jsonpath.JsonPath, java.lang.Object) method otherwise it throws NotImplementedException
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • valueEvaluator

      protected Evaluator<?> valueEvaluator
  • Constructor Details

  • Method Details

    • evaluate

      public QueryResult<String> evaluate(EvaluationContext context)
    • updateAttribute

      public com.jayway.jsonpath.DocumentContext updateAttribute(com.jayway.jsonpath.DocumentContext documentContext, com.jayway.jsonpath.JsonPath jsonPath, Object value)
      Update the attribute at the specified path. The subclasses will need to implement this method.
      Parameters:
      documentContext - the document to be updated
      jsonPath - the path to update
      value - the value to be applied at the specified path
      Returns:
      the updated DocumentContext
      Throws:
      org.apache.commons.lang3.NotImplementedException - if operation is not implemented