Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why CSV instead of newline-separated JSON arrays?

Ambiguity in your storage format isn’t good in the long run… JSON lines can be trivially parsed anywhere without a second thought.






In hindsight, JSONL would have been much easier to deal with as a developer. But I still don't regret picking CSV -- DB interface is pluggable (so one can use JSONL if needed), and I deliberately wanted to have different formats for data storage (models) and data transfer objects (DTOs) in the API layer, just like with real databases. I agree, CSV is very limited and fragile, but it made data conversion/validation part more explicit.

or sqlite?



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: