code: public JSONBuilder toJSON(JSONBuilder jb) {
          return jb.append('{').serialize("columns", columns).append(',').serialize("rows", rows).append('}');
      }
docs: Inside an object: serialized the cached result set into JSON.
  
  @param jb a JSONBuilder to contain generated JSON text
  @return the JSONBuilder