←back to thread

200 points dcu | 1 comments | | HN request time: 0.402s | source
Show context
pavlov ◴[] No.44456831[source]
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.

replies(4): >>44457677 #>>44457680 #>>44458785 #>>44459184 #
1. zserge ◴[] No.44457677[source]
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.