Re:Ask HN: Is there a way to compress repeated JSON objects?
by borplk on Thursday July 07, 2016 @12:07PM
(#12050188)
Firstly as others noted you can use a transport-layer level compression mechanism like gzip.
The other bit sort of comes down to application level logic.
You can filter down to the unique items and store them in a json array (or object) and in the other places instead of repeating the item use a value to reference the items (like index in the array or a key in the object).
The other bit sort of comes down to application level logic.
You can filter down to the unique items and store them in a json array (or object) and in the other places instead of repeating the item use a value to reference the items (like index in the array or a key in the object).