diff options
Diffstat (limited to 'csv2json.py')
-rw-r--r-- | csv2json.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/csv2json.py b/csv2json.py new file mode 100644 index 0000000..20c264d --- /dev/null +++ b/csv2json.py @@ -0,0 +1,9 @@ +import csv +import json + +csvfile = open('kurse.csv', 'r') +jsonfile = open('kurse.json', 'w') + +reader = csv.DictReader( csvfile) +out = json.dumps( [ row for row in reader ] ) +jsonfile.write(out)
\ No newline at end of file |