|
|
|
|
|
by ludocode
1847 days ago
|
|
This is the real answer. All of the other answers are suggesting various changes to the JSON structure to eliminate key repetition, but this is irrelevant under compression. Where it becomes relevant is if each record is stored as a separate document so you can't just compress them all together. Compressing each record separately won't eliminate the duplication, so you're better off with either a columnar format (like a typical database) or a schema-based format (like protobuf.) |
|
So you just have an array of arrays. Or even a huge array and every X elements, it’s a new record.
If each one has 2 keys,
Can become, Or just every 2 will be a new record,