Shorten property names in JSON: does it make sense? Shorten property names in JSON: does it make sense? json json

Shorten property names in JSON: does it make sense?


It makes some sense, depending on your circumstances.

Obviously, if the value is quite large, there's not much point in shortening the key, but if you have very large JSON objects with relatively small values then shorter keys can save both storage on your system and transmission time.

But you do, of course, need to beware of "obfuscating" the JSON unnecessarily, leading to coding errors. In particular, it's probably best to use meaningful keys during development, then shorten them, if deemed necessary, prior to "ship".

In addition, if gzip (or similar) compression is used the shorter keys will make almost no difference in the size of the compressed object.