Code Issues Releases

Releases

v1.0.0 - Initial Release

v1.0.0 · August 27, 2026

main

csv-to-json v1.0.0

A lightweight, zero-dependency CSV-to-JSON converter built for AI agent workflows.

Features

  • Type inference — automatically converts numeric strings, booleans (true/yes/false/no), and empty values to their native JSON types
  • Nested key expansion — dot-notation CSV headers (e.g. user.name) are expanded into nested JSON objects
  • Streaming — process arbitrarily large CSV files one record at a time via generator-based API
  • Flexible input — accepts file paths, raw CSV strings, or any readable text stream
  • CLI and library — use standalone from the command line or import directly into Python projects
  • Zero dependencies — Python 3.10+ standard library only

Usage

python src/csv_converter.py data.csv -o output.json
cat data.csv | python src/csv_converter.py - --expand-keys --compact
from src.csv_converter import csv_to_json, stream_csv_to_json
result = csv_to_json("data.csv", expand_keys=True)