code: private static void convertCBLQueryRowsToMaps(Map<String, Object> allDocsResult) {
          List<Map<String, Object>> rowsAsMaps = new ArrayList<Map<String, Object>>();
          List<QueryRow> rows = (List<QueryRow>) allDocsResult.get("rows");
          if (rows != null) {
              for (QueryRow row : rows) {
                  rowsAsMaps.add(row.asJSONDictionary());
              }
          }
          allDocsResult.put("rows", rowsAsMaps);
      }
docs: This is a hack to deal with the fact that there is currently no custom
  serializer for QueryRow.  Instead, just convert everything to generic Maps.