code: private Object convertFile(Object name) throws IOException, JSONException{
      if (name instanceof String) {
        String file = (String) name;
        JSONObject json = getJsonConfig(file);
        if (json!=null) {
          return json;
        }
      } else if (name instanceof Path) {
          Path file = (Path)name;
          JSONObject json = getJsonConfig(file);
          if (json != null) {
            return json;
          }
      } 
      return name;
    }
docs: Given a xml config file, return the corresponding json
  object if it exists.