Class JsonPath


  • @ProviderType
    public final class JsonPath
    extends Object
    Minimal implementation of the JSON path API.
    • Constructor Detail

      • JsonPath

        public JsonPath​(List<JsonElement> elements)
        Parameters:
        elements - Passed elements
    • Method Detail

      • contains

        public boolean contains​(String query)
        Parameters:
        query - JSON path query
        Returns:
        True if bread crumb contains query
      • startsWith

        public boolean startsWith​(String query)
        Parameters:
        query - JSON path query
        Returns:
        True if bread crumb starts with query
      • endsWith

        public boolean endsWith​(String query)
        Parameters:
        query - JSON path query
        Returns:
        True if bread crumb ends with query
      • isEqualTo

        public boolean isEqualTo​(String query)
        Parameters:
        query - JSON path query
        Returns:
        True if bread crumb equals query
      • getLast

        public JsonElement getLast()
        Returns:
        The last passed element in the bread crumb
      • getLast

        public JsonElement getLast​(int steps)
        Parameters:
        steps - Number of steps
        Returns:
        The top-steps last passed element in the bread crumb
      • size

        public int size()
        Returns:
        The number of passed elements in the bread crumb