What the options change
| CSV cell | Detect types off | Detect types on |
|---|---|---|
| 42 | "42" | 42 |
| 3.5 | "3.5" | 3.5 |
| true | "true" | true |
| (empty) | "" | null |
| 01234 | "01234" | "01234" (leading zero kept) |
Nesting with dotted headers
Name your columns with dots and they nest: a header row of id,user.name,user.email gives {"id": 1, "user": {"name": "Ada", "email": "…"}}. It's the reverse of how the JSON to CSV converter flattens, so a round trip gets you back where you started.
Converting in code
Python: pandas.read_csv("data.csv").to_json(orient="records"). Node: read the file and split it, or use a CSV parser such as csv-parse for quoted fields and line breaks inside cells.
