You can export to CSV format using SELECT INTO OUTFILE/S3, using the instructions that @rob linked to above. The CONFIG and CREDENTIALS go first, then the formatting instructions. E.g.
SELECT * FROM t INTO S3 'tmp/a'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
The TO_JSON function implementation was not quite ready for 7.1, so has been removed from the general availability (GA) release, coming shortly. We are considering options for when to deliver it, and will report back later when we have a firm delivery date.