4 ms·
I wouldn't be so quick to judge the energy lost by using JSON over some binary format as "waste". Standardization on JSON has saved countless developer hours by
by sirsar 11y ago
I wouldn't be so quick to judge the energy lost by using JSON over some binary format as "waste". Standardization on JSON has saved countless developer hours by being so easy to read, write, implement, and debug* . This translates directly and indirectly into economic benefits for everyone. Similarly, I would have taken much longer to start learning HTTP if it was not inspectable with near-zero friction. People "waste" electricity for a reason.
* Is it perfect? No. Is any protocol? No. Would a binary format be better? Very likely, no.
- fapjacks 11y agoThe most salient point of all: Human readability. Absolutely spot on.
- nutate 11y agoNot to mention most importantly JSON is firmly on one side of the undecidability cliff in terms of parsing limits. The nesting limits and length limits make parsing it safe, whereas a given binary protocol may have recursion or buffer size definitions which make for ripe security holes. (Even XML has parser bombs)