docs: protected void buildJsonGalleryItem(String galleryUrl) {
  
          try {
              JspWriter out = getJsp().getJspContext().getOut();
              if (getCms().existsResource(galleryUrl)) {
                  JSONObject jsonObj = new JSONObject();
                  try {
                      CmsResource res = getCms().readResource(galleryUrl);
                      String path = getCms().getSitePath(res);
                      // read the gallery title
                      String title = getCms().readPropertyObject(
                          res,
                          CmsPropertyDefinition.PROPERTY_TITLE,
                          false).getValue("");
                      try {
                          // 1: gallery title
                          jsonObj.put("title", title);
                          // 2: gallery path
                          jsonObj.put("path", path);
                          // 3: active flag
                          jsonObj.put("active", true);
                          out.print(jsonObj);
                      } catch (JSONException e) {
                          if (LOG.isErrorEnabled()) {
                              LOG.error(e.getLocalizedMessage(), e);
                          }
                      }
                  } catch (CmsException e) {
                      // error reading title property
                      if (LOG.isErrorEnabled()) {
                          LOG.error(e.getLocalizedMessage(), e);
                      }
                  }
              } else {
                  out.print(RETURNVALUE_NONE);
              }
          } catch (IOException e) {
              if (LOG.isErrorEnabled()) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
      }