3 ms·
Because JSON is not well suitable as a fast machine exchange format and people trying to make it work anyway. If you ask me, JSON serializers should be simple
by vbezhenar 2y ago
Because JSON is not well suitable as a fast machine exchange format and people trying to make it work anyway.
If you ask me, JSON serializers should be simple and slow, and if you need speed, change wire format for something intrinsically fast.
I understand that this is not the approach that people will take, most developers prefer simple interface with complex implementation over complex interface with simple implementation. But my opinion is that implementation simplicity is what matters in the end.
- touisteur 2y agoAnother way of seeing this is: whatever way people are using JSON, over a fleet of all the machines running the parser (or serializer), reducing the execution time (a good enough proxy to energy consumption) on the whole fleet is worthwile. Especially if it has zero impact on the code calling this parser/serializer (so, no second-order energy spent because of the change breaking some API or contract).