Code Issues Releases

Releases

v1.0.0 — First stable release

v1.0.0 · August 30, 2026

main

First stable release of csv-to-json, a lightweight, dependency-free CSV-to-JSON converter written in pure Python (3.10+, standard library only).

What it does

Converts CSV data — from a file path, raw string, or stdin — into clean JSON, usable as a CLI tool or as an importable library.

Highlights

  • Type inference: numeric, boolean (true/yes, false/no), and empty-to-null casting, with --no-type-inference to opt out
  • Nested key expansion: dot-notation headers like user.address.city become nested JSON objects via --expand-keys
  • Streaming: stream_csv_to_json() yields one record at a time so large files never load fully into memory
  • Flexible I/O: file, raw CSV string, or stdin in; pretty or --compact JSON to stdout or a file
  • Custom delimiters: -d '\t' for TSV and friends

Usage

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

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