If it could somehow produce a significant reduction with fewer CPU cycles, there may be a really niche use case, but I don't see those often.
If it could somehow produce a significant reduction with fewer CPU cycles, there may be a really niche use case, but I don't see those often.
I had devs try to "optimise" the JSON our services were returning by doing things like abbreviating field names that were repeated very often or replacing long string constants with short integers or removing formatting, and so on. When I asked them to do actual test when the service returns gzipped output and they found out that even reducing the JSON size this way by half does not make any measurable difference on the compressed stream in most cases.
In general text formats are a compromise. They are bulky and and inefficient to parse. What you get in exchange is ease of development.
If you are willing to complicate the format just to improve performance, at some point you no longer get ease of development and you should just switch to binary altogether.