←back to thread

115 points graderjs | 4 comments | | HN request time: 0.774s | source
1. sillysaurusx ◴[] No.25004844[source]
Amusingly, this is almost identical to how HN’s database works. Or worked.

It wasn’t json, but it probably could’ve been.

replies(2): >>25005309 #>>25005392 #
2. XorNot ◴[] No.25005309[source]
I've definitely also written a big chunk of something like this (including JSON) for an internal tool.

Just didn't get to realising my folders were generic tables.

3. dheera ◴[] No.25005392[source]
I'd go for YAML instead of JSON, or "JSON with trailing commas", or else the diffs become messy.
replies(1): >>25005450 #
4. jeswin ◴[] No.25005450[source]
YAMLs biggest advantage over JSON: records can be appended (at the end of an existing file). Which you can't do with JSON objects, arrays etc because of the closing bracket at the end.