Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
/ JSON2CSV Public archive
forked from vladikk/JSON2CSV

Utility to convert json files to csv

License

Notifications You must be signed in to change notification settings

gibson3659/JSON2CSV

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON2CSV v1.0

JSON2CSV is a Apache2 Licensed python based utility that converts json data to a csv file.

Usage

python json2csv.py "input_file.json" "output_file.csv"

If you pass in the following json file:

[
    {
        "id": 1,
        "name": {
            "first": "john",
            "last": "johnson"
        },
        "age": 27,
        "languages": [ "c#", "vb", "python" ]
     },
     {
        "id": 2,
        "name": {
            "first": "scott",
            "middle": "scottster",
            "last": "scottson"
        },
        "age": 29,
        "languages": [ "objective-c", "c++" ]
     }
]

You'll get the following csv file:

age ,id ,languages_0    ,languages_1        ,languages_2        ,name_first ,name_last  ,name_middle
27  ,1  ,c#             ,vb                 ,python             ,john       ,johnson    ,
29  ,2  ,objective-c    ,c++                ,                   ,scott      ,scottson   ,scottster

About

Utility to convert json files to csv

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%