code: public static Properties getProperties(JSONObject json, String rootObjectPath,
        String customObjectPath) throws JSONException, InvalidJSONPathException {
      if (customObjectPath != null && !customObjectPath.equals("")) {
        try {
          return getPropertiesFromTraversal(json, customObjectPath);
        } catch (InvalidJSONPathException e) {
          // fall through to using rootObjectPath
        }
      }
      return getPropertiesFromTraversal(json, rootObjectPath);
    }
docs: Uses an object path to traverse the json object and return a Properties
  object
  from the JSONObject (map<string, string>) object at the end of the path. If
  customObjectPath
  is null or isn't a valid path for the json object then rootObjectPath is
  used as the path.
  
  @param json
  @param rootObjectPath
  @param customObjectPath
  @return
  @throws JSONException
  @throws InvalidJSONPathException