Class JsonPathUtils

java.lang.Object
org.citrusframework.json.JsonPathUtils

public class JsonPathUtils extends Object
Since:
2.7.4
Author:
Christoph Deppisch
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    evaluate(com.jayway.jsonpath.ReadContext readerContext, String jsonPathExpression)
    Evaluate JsonPath expression using given read context and return result as object.
    static Object
    evaluate(String payload, String jsonPathExpression)
    Evaluate JsonPath expression on given payload string and return result as object.
    static String
    evaluateAsString(com.jayway.jsonpath.ReadContext readerContext, String jsonPathExpression)
    Evaluate JsonPath expression using given read context and return result as string.
    static String
    evaluateAsString(String payload, String jsonPathExpression)
    Evaluate JsonPath expression on given payload string and return result as string.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonPathUtils

      public JsonPathUtils()
  • Method Details

    • evaluate

      public static Object evaluate(String payload, String jsonPathExpression)
      Evaluate JsonPath expression on given payload string and return result as object.
      Parameters:
      payload -
      jsonPathExpression -
      Returns:
    • evaluate

      public static Object evaluate(com.jayway.jsonpath.ReadContext readerContext, String jsonPathExpression)
      Evaluate JsonPath expression using given read context and return result as object.
      Parameters:
      readerContext -
      jsonPathExpression -
      Returns:
    • evaluateAsString

      public static String evaluateAsString(String payload, String jsonPathExpression)
      Evaluate JsonPath expression on given payload string and return result as string.
      Parameters:
      payload -
      jsonPathExpression -
      Returns:
    • evaluateAsString

      public static String evaluateAsString(com.jayway.jsonpath.ReadContext readerContext, String jsonPathExpression)
      Evaluate JsonPath expression using given read context and return result as string.
      Parameters:
      readerContext -
      jsonPathExpression -
      Returns: