Class PathLocator


  • public class PathLocator
    extends Object
    Searches for paths in a JSONObject and returns those found.

    Traverses the specified JSONObject searching for nodes whose paths (from the root down) match any of the user-specified paths. The paths that match are returned.

    A path to locate must be specified in the n-gram format - a list of keys from the root down separated by dots: K0[[[[.K1].K2].K3]...]
    A key to the right of a dot is a direct child of a key to the left of a dot. Keys with a dot in their name are not supported.

    Author:
    adoneitan@gmail.com
    • Constructor Detail

      • PathLocator

        public PathLocator​(net.minidev.json.JSONArray pathsToFind)
      • PathLocator

        public PathLocator​(List<String> pathsToFind)
      • PathLocator

        public PathLocator​(String... pathsToFind)