{"id":43637523,"url":"https://github.com/alingse/jsoncsv","last_synced_at":"2026-02-10T17:08:54.486Z","repository":{"id":62572831,"uuid":"64307083","full_name":"alingse/jsoncsv","owner":"alingse","description":"a command tool easily convert json file to csv or xlsx  wiki https://deepwiki.com/alingse/jsoncsv","archived":false,"fork":false,"pushed_at":"2022-12-01T13:07:29.000Z","size":129,"stargazers_count":100,"open_issues_count":2,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-12-05T23:26:37.832Z","etag":null,"topics":["convert","csv","json","json2csv","json2excel","json2xls","tools"],"latest_commit_sha":null,"homepage":"https://jsoncsv-web.vercel.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alingse.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"alingse","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-07-27T12:36:09.000Z","updated_at":"2025-09-11T19:39:19.000Z","dependencies_parsed_at":"2023-01-23T20:01:03.043Z","dependency_job_id":null,"html_url":"https://github.com/alingse/jsoncsv","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/alingse/jsoncsv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alingse%2Fjsoncsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alingse%2Fjsoncsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alingse%2Fjsoncsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alingse%2Fjsoncsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alingse","download_url":"https://codeload.github.com/alingse/jsoncsv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alingse%2Fjsoncsv/sbom","scorecard":{"id":184335,"data":{"date":"2025-08-11","repo":{"name":"github.com/alingse/jsoncsv","commit":"d3ed43dcea31a9fea09623d5664b76c4a658b2a9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 1/10 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T19:29:14.476Z","repository_id":62572831,"created_at":"2025-08-16T19:29:14.476Z","updated_at":"2025-08-16T19:29:14.476Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29092024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convert","csv","json","json2csv","json2excel","json2xls","tools"],"created_at":"2026-02-04T17:36:25.983Z","updated_at":"2026-02-04T17:36:26.632Z","avatar_url":"https://github.com/alingse.png","language":"Python","funding_links":["https://ko-fi.com/alingse"],"categories":[],"sub_categories":[],"readme":"\njsoncsv : easily convert json to csv or xls[x]\n==============================================\n\n |pypi|  |build|  |coverage|\n\n.. |pypi| image:: https://img.shields.io/pypi/v/jsoncsv.svg\n    :target: https://pypi.python.org/pypi/jsoncsv\n\n.. |build| image:: https://api.travis-ci.org/alingse/jsoncsv.svg?branch=master\n\n.. |coverage| image:: https://coveralls.io/repos/github/alingse/jsoncsv/badge.svg\n    :target: https://coveralls.io/github/alingse/jsoncsv\n\n\njsoncsv (with `mkexcel`) is a command tool to convert json file to csv/xlsx file.\n\nIt's simple, and no need user to specify the keys.\n\nJust use them.\n\nQuick Start :\n=================\n\nCat the raw.json to csv/xls use command line tool\n\n.. code-block:: bash\n\n    cat raw.json | jsoncsv | mkexcel \u003e output.csv\n    cat raw.json | jsoncsv | mkexcel -t xls \u003e output.xls\n\nEach line of raw json text file is a json object\n\n.. code-block:: json\n\n    {\"id\":1, \"name\":\"A\", \"year\": 2015}\n    {\"id\":2, \"name\":\"S\", \"zone\": \"china\"}\n\nJsoncsv will output a csv file\n\n.. code-block:: \n\n    id,name,year,zone\n    1,A,2015,\n    2,S,,china\n\nThis is easily and needn't care the different keys from any two object.\n\nFor Json Array\n-------------------\n\nIf input file is an json_array, use `-A/--array` to decode it\n\n.. code-block:: bash\n\n\tcat raw.json | jsoncsv -A | mkexcel \u003e output.csv\t\n\n**Input File**\n\n.. code-block:: json\n\n\t[\n\t    {\"id\":1, \"name\":\"A\", \"year\": 2015}, \n\t    {\"id\":2, \"name\":\"S\", \"zone\": \"china\"}\n\t]\n\n**Output File**\n\n.. code-block::\n\n    id,name,year,zone\n    1,A,2015,\n    2,S,,china\n\nStep by Step\n---------------------------\n\n.. code-block:: bash\n\n    $jsoncsv raw.json expand.json\n    $mkexcel expand.json -t xls output.xls\n\nget more options with `--help`.\n\n.. code-block:: bash\n\n    jsoncsv --help\n    mkexcel --help\n\nInstall\n================\n\n.. code-block:: bash\n\n    pip install jsoncsv\n\n\nUsage\n=================\n\nsee #QuickStart and get more options with `--help`.\n\njust expand/restore the json, the expand json is one layer json.\n\n.. code-block:: bash\n\n    jsoncsv raw.json expand.json\n    jsoncsv -r expand.json raw.json\n    cat raw.json | jsoncsv | jsoncsv -r \u003e raw2.json\n\nmkexcel the expanded json (one layer)\n\n.. code-block:: bash\n\n    mkexcel expand.json output.csv\n    mkexcel -t xls expand.json \u003e output.xls\n    mkexcel -t csv expand.json \u003e output.csv\n\n-e, --expand\n-------------\n\nexpand json, 展开 json\n\n.. code-block:: bash\n\n    $jsoncsv -e raw.json expand.json\n    $cat raw.json expand.json\n    {\"s\":[1,2,{\"w\":1}]}\n    {\"s.2.w\": 1,\"s.0\": 1,\"s.1\": 2}\n\n\n{\"s\":[1,2,{\"w\":1}]} will transformed to {\"s.2.w\": 1,\"s.0\": 1,\"s.1\": 2}\n\nthe output \"expand.json\" is only one layer json, it can be easy change to csv or xlsx (with `mkexcel`)\n\n-r, --restore\n---------------\nrestore the expanded json 重构被展开的json\n\n.. code-block:: bash\n\n    jsoncsv -r expand.json raw.json\n    cat expand.json raw.json\n    {\"s.2.w\": 1,\"s.0\": 1,\"s.1\": 2}\n    {\"s\": [1, 2, {\"w\": 1}]}\n\n{\"s.2.w\": 1,\"s.0\": 1,\"s.1\": 2} change to {\"s\":[1,2,{\"w\":1}]}\n\n-s, --separator\n---------------\n\nseparator used for combine the keys in the tree\n\ndefault separator is **.**\n\n--safe\n---------\non safe mode, use escape separator to avoid confilct\n\nexpand:\n\n['aa', 'bb', 'www.xxx.com'] --\u003e 'aa\\\\.bb\\\\.www.xxx.com'\n\nrestore:\n\n'aa\\\\.bb\\\\.www.xxx.com' --\u003e ['aa', 'bb', 'www.xxx.com']\n\n\nmkexcel\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\n\ndump expanded (by **jsoncsv**) json file to csv or xls file\n\n.. code-block:: bash\n\n    mkexcel expand.json output.csv\n\n-t, --type\n--------------\n\nchose dump type in ['csv', 'xls'] default is 'csv'\n\n.. code-block:: bash\n\n    cat expand.json|mkexcel -t csv \u003e output.csv\n    cat expand.json|mkexcel -t xls \u003e output.xls\n\n\nNOTE/TODO\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\n\n1. dict keys can't be  just array indexes\n--------------------------------------------\n\nexample:\n\n.. code-block:: bash\n\n\techo '{\"0\":1,\"1\":[1,2]}'|jsoncsv -e| jsoncsv -r\n\t[1, [1, 2]]\n\n\n2. mkexcel enable hooks\n-----------------------------------------\n\nwait next next version\n\n\n3. unicodecsv is not good enough\n-----------------------------------------\n\nbut better than python strand library csv.\n\n4. Windows is poor support\n-----------------------------------------\nsee https://github.com/alingse/jsoncsv/issues/37\n\ntry use https://jsoncsv-web.vercel.app instead\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falingse%2Fjsoncsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falingse%2Fjsoncsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falingse%2Fjsoncsv/lists"}