Skip to content

A command line utility to convert file(s) containing json objects to csv file using python

License

Notifications You must be signed in to change notification settings

manu-chauhan/json_to_csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

json_to_csv

A command line utility (developed for personal need initially) to convert a file containing json objects to CSV file using python3.

The scipt can take either 1 or more file names as command line arguments OR "all" argument to consider all .json or .text files in current directory. The files must contain valid json objects where each object contains the same keys.

The current version just goes to just 2 levels down from the top level..

Will make changes to consider any number of levels within json objects in next version.

Eg: { "name" : "John",

"phone" : { "work": XXXXXX, "personal": YYYYYY },

"email" : "foo@bar.com"

}

will be processed by the program where the output CSV is ( with keys as column names in ascending order ) :

 email        name     phone_personal   phone_work

foo@bar.com      John            YYYYYY              XXXXXX

About

A command line utility to convert file(s) containing json objects to csv file using python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages