mlr --icsv --ojsonl cat data.csv

Category: Data Science & Analysis

mlr --icsv --ojsonl cat data.csv

Convert a CSV file to JSON Lines format

JSON Lines (--ojsonl) writes each record as a single compact JSON object on its own line, unlike --ojson which emits a pretty array. Line-delimited JSON streams well through pipes and log processors, making it a popular interchange format. Each CSV row maps to one line of JSON. This is the fastest way to hand a spreadsheet to a JSON-consuming tool.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.