code: protected JSONObject buildJsonItemObject(CmsResource res) {
  
          // create a new JSON object
          JSONObject jsonObj = new JSONObject();
          String sitePath = getCms().getRequestContext().getSitePath(res);
          // fill JSON object with common information
          buildJsonItemCommonPart(jsonObj, res, sitePath);
          // fill JSON object with specific information
          buildJsonItemSpecificPart(jsonObj, res, sitePath);
  
          return jsonObj;
      }
docs: Returns a JSON object containing information of the given resource for usage in the gallery.<p>
  
  The content of the JSON object consists of a common and a specific part of the given resource.<p>
  
  @param res the resource to create the object from
  @return the JSON object containing information from the given resource