Code Issues Releases

Releases

v1.0.0 — Initial release

v1.0.0 · August 28, 2026

main

First stable release of csv-to-json, a lightweight, dependency-free CSV-to-JSON converter (Python 3.10+, stdlib only).

What it does

Converts CSV data to JSON from files, raw strings, or stdin — usable as a CLI tool or imported as a library.

Highlights

  • Type inference: numeric strings become int/float, true/yes and false/no become booleans, empty cells become null (disable with --no-type-inference)
  • Dot-notation key expansion: headers like user.address.city become nested JSON objects via --expand-keys
  • Streaming: stream_csv_to_json() yields records one at a time, so large files never need to fit in memory
  • Custom delimiters: handle TSV or any single-character delimiter with -d
  • Compact or pretty output: --compact for minified JSON, indented by default; write to file with -o or print to stdout

Usage

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

See README.md for library usage and the full CLI reference.