Class PathParser


  • public class PathParser
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PathDetails getParentPathAndNewNodeName​(java.lang.String path)
      This method parses JsonPath to find node name that needs to be added and path to the parent of new node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getParentPathAndNewNodeName

        public static PathDetails getParentPathAndNewNodeName​(java.lang.String path)
                                                       throws JsonPatchException
        This method parses JsonPath to find node name that needs to be added and path to the parent of new node. Additionally, it finds if path contains filter or multi index notation (like [1:5])
        Parameters:
        path - Path in JsonPath or JsonPointer notation
        Returns:
        PathDetails containing path to parent, name of new node and boolean value if path contains filter or multi index notation
        Throws:
        JsonPatchException - when invalid path provided