presto-cli/src/main/java/io/prestosql/cli/JsonPrinter.java/JsonPrinter/printRows
class JsonPrinter:    @Override
    public void printRows(List<List<?>> rows, boolean complete)
            throws IOException
    {
        JsonFactory jsonFactory = new JsonFactory();
        for (List<?> row : rows) {
            JsonGenerator jsonGenerator = jsonFactory.createGenerator(writer);
            jsonGenerator.writeStartObject();
            for (int position = 0; position < row.size(); position++) {
                String columnName = fieldNames.get(position);
                jsonGenerator.writeObjectField(columnName, formatValue(row.get(position)));
            }
            jsonGenerator.writeEndObject();
            jsonGenerator.writeRaw('\n');
            jsonGenerator.flush();
        }
    }