code: public List<String> queryJson(String queryString, boolean getPatchSets, boolean getCurrentPatchSet,
                                    boolean getFiles, boolean getCommitMessage)
              throws SshException, IOException {
          final List<String> list = new LinkedList<String>();
          try {
              runQuery(queryString, getPatchSets, getCurrentPatchSet, getFiles, getCommitMessage, false,
                      new LineVisitor() {
                          @Override
                          public void visit(String line) {
                              list.add(line.trim());
                          }
                      });
          } catch (GerritQueryException gqe) {
              logger.error("This should not have happened!", gqe);
          }
          return list;
      }
docs: Runs the query and returns the result as a list of JSON formatted strings.
  @param queryString the query.
  @param getPatchSets if all patch-sets of the projects found should be included in the result.
  Meaning if --patch-sets should be appended to the command call.
  @param getCurrentPatchSet if the current patch-set for the projects found should be included in the result.
  Meaning if --current-patch-set should be appended to the command call.
  @param getFiles if the files of the patch sets should be included in the result.
  Meaning if --files should be appended to the command call.
  @param getCommitMessage if full commit message should be included in the result.
  Meaning if --commit-message should be appended to the command call.
  @return a List of JSON formatted strings.
  @throws SshException if there is an error in the SSH Connection.
  @throws IOException for some other IO problem.