@Override
  void printFooter(Rows.Row header) {
    ByteArrayOutputStream buf = (ByteArrayOutputStream) generator.getOutputTarget();
    try {
      generator.flush();
      String out = buf.toString(StandardCharsets.UTF_8.name());
      beeLine.output(out);
    } catch(IOException e) {
      beeLine.handleException(e);
    }
    buf.reset();
  }
OutputFormat for hive JSON file format.
Removes "{ "resultset": [...] }" wrapping and prints one object per line.
This output format matches the same format as a Hive table created with JSONFILE file format:
CREATE TABLE ... STORED AS JSONFILE;
e.g.
{"name":"Ritchie Tiger","age":40,"is_employed":true,"college":"RIT"}
{"name":"Bobby Tables","age":8,"is_employed":false,"college":null}
...

Note the lack of "," at the end of lines.
beeline/src/java/org/apache/hive/beeline/JSONFileOutputFormat.java