code: public JSONObject toJSON() {
          JSONObject ret = super.toJSON();
          if (attributeNames != null && attributeNames.size() > 0) {
              if (attributeNames.size() > 1) {
                  ret.put("attribute", attributeNames);
              } else {
                  ret.put("attribute", attributeNames.get(0));
              }
          }
          if (getPathParts() != null && getPathParts().size() > 0) {
              ret.put("path", getPath());
          }
          return ret;
      }
docs: {@inheritDoc}