3 ms·
I'm two weeks late, but you could do something like python -c 'import csv, json, sys; [print(json.dumps(r)) for r in csv.DictReader(sys.stdin)]' | jq -s .
by vladxyz 3y ago
I'm two weeks late, but you could do something like
python -c 'import csv, json, sys; [print(json.dumps(r)) for r in csv.DictReader(sys.stdin)]' | jq -s .
to stream the csv rows instead of reading the whole file into ram.