Code Issues Releases

Releases

v1.0.0 — Initial release

v1.0.0 · August 26, 2026

main

First stable release of csv-to-json, a dependency-free CSV-to-JSON converter for developer workflows.

What it does

Reads CSV from a file path, a raw string, or a text stream (including stdin) and emits JSON — either as a string, to stdout, or written to a file.

Highlights

  • Zero dependencies — Python 3.10+ standard library only.
  • Type inference — empty cells become null; true/yes/false/no become booleans; numeric strings become int or float; everything else stays a string.
  • Nested-key expansion — dot-notation headers like user.address.city expand into nested JSON objects (opt-in via --expand-keys).
  • Streamingstream_csv_to_json() yields one record at a time so large files never load fully into memory.
  • Flexible delimiters — comma by default, override with -d (e.g. -d $'\t' for TSV).
  • CLI + library — usable from the shell or importable as from csv_converter import csv_to_json.

Usage

python src/csv_converter.py data.csv -o data.json --expand-keys
cat data.tsv | python src/csv_converter.py - -d $'\t' --compact
from csv_converter import csv_to_json, stream_csv_to_json
json_str = csv_to_json("data.csv", expand_keys=True)

Compatibility

  • Python 3.10+
  • No external packages
  • MIT-licensed