Skip to content

A simple Python script that converts CSV files to valid JSON

Notifications You must be signed in to change notification settings

ryanwellsdotcom/csv-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSV to JSON converter

This is a simple Python script the converts a properly formatted CSV file into a separate JSON file.

Requirements

This script requires Python version 3x.

Configuration

In the csvToJson.py file, ensure the .csv filename matches your actual CSV filename:

with open('sample.csv'...

Also, in the same .py file, ensure the .json filename matches your intended filename for the outputted JSON file. This name does not have to match the .csv filename:

with open('sample.json'...

Running the script

Ensure the .csv and .py files are in the same directory and run:

python3 csvToJson.py

You should now see your JSON file added to the directory.


Author

Ryan Wells: ryanwells.com

License

Licensed under MIT. Enjoy.

About

A simple Python script that converts CSV files to valid JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages