Code Issues Releases

Releases

csv-to-json v1.0.0

v1.0.0 · August 29, 2026

main

First stable release of csv-to-json, a lightweight, dependency-free CSV-to-JSON converter built on the Python standard library.

What it does

Converts CSV data to JSON from the command line or as an importable library, with sensible defaults and zero external dependencies (Python 3.10+).

Highlights

  • Type inference — numeric, boolean (true/yes, false/no), and empty-string-to-null casting, with a --no-type-inference escape hatch
  • Nested key expansion — dot-notation headers like user.address.city become nested JSON objects via --expand-keys
  • Streamingstream_csv_to_json() yields one record at a time so large files never need to fit in memory
  • Flexible input — file paths, raw CSV strings, or stdin; output to file or stdout, pretty or --compact
  • Custom delimiters — handle TSV and friends with -d

Usage

python src/csv_converter.py data.csv -o output.json
cat data.csv | python src/csv_converter.py - --compact

See the README for library examples and the full CLI reference.