←back to thread

200 points dcu | 5 comments | | HN request time: 0.398s | source
1. 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 #
2. 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.
3. thayne ◴[] No.44457680[source]
or sqlite?
4. ◴[] No.44458785[source]
5. ◴[] No.44459184[source]