Created
October 2, 2020 14:51
-
-
Save mrw34/204a228a5c0e9c1c938c62a2dc997999 to your computer and use it in GitHub Desktop.
CSV to JSON using Python 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c "import csv,json,fileinput;print(json.dumps(list(csv.DictReader(fileinput.input()))))" file.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment