Class SynapseJsonPath

    • Constructor Detail

      • SynapseJsonPath

        public SynapseJsonPath​(String jsonPathExpression)
                        throws org.jaxen.JaxenException
        Throws:
        org.jaxen.JaxenException
    • Method Detail

      • getJsonPath

        public com.jayway.jsonpath.JsonPath getJsonPath()
      • getParentPath

        public String getParentPath()
      • setJsonPath

        public void setJsonPath​(com.jayway.jsonpath.JsonPath jsonPath)
      • stringValueOf

        public String stringValueOf​(String jsonString)
      • getJsonPathExpression

        public String getJsonPathExpression()
      • setJsonPathExpression

        public void setJsonPathExpression​(String jsonPathExpression)
      • evaluate

        public Object evaluate​(Object object)
        Read the JSON Stream and returns a list of objects using the jsonPath.
        Specified by:
        evaluate in interface org.jaxen.XPath
        Overrides:
        evaluate in class org.jaxen.BaseXPath
      • replace

        public Object replace​(Object rootObject,
                              Object newChild)
        Replaces first matching item with a given child object. Updated root object will be return back to the caller
        Parameters:
        rootObject - Root JSON Object or Array
        newChild - New jsonObject to replace
        Returns:
        Updated Root Object
      • isWholeBody

        public boolean isWholeBody()
        Getter method for isWholeBody
        Returns:
        returns true if jsonPath expression is $ or $
      • booleanValueOf

        public boolean booleanValueOf​(MessageContext synCtx)
        This method will return the boolean value of the jsonpath.
        Parameters:
        synCtx - message context
        Returns:
        boolean value