DEV Community

luck
luck

Posted on

Parse and Convert JSON to CSV with Python on the Command Line

Parse and Convert JSON to CSV with Python

A quick guide to converting JSON data to CSV format using only Python stdlib.

Why Convert?

  • JSON for APIs and storage
  • CSV for spreadsheets and data analysis
  • Converting between them is a common dev task

The Code

Usage

Nested Objects

Use a flatten function for nested JSON. Built with Python 3 stdlib only.

Top comments (0)