4 ms·
I wish people wouldn't use JSON for M2M communication and used e.g. CBOR instead. It's such a waste of resources. In the 70's, using text formats for protocols
by js8 9y ago
I wish people wouldn't use JSON for M2M communication and used e.g. CBOR instead. It's such a waste of resources.
In the 70's, using text formats for protocols was understandable (7-bit serial lines..). Today, it is not.
- emodendroket 9y agoI think people like the ease of human-readable formats for debugging.
- IshKebab 9y agoJust decode the data before logging it... I mean, I can't think of many situations where I'm debugging something by looking at raw bytes when I couldn't easily just dump the decoded representation instead. People don't use BCD for ease of debugging do they?
- emodendroket 9y agoI mean, maybe it's worth doing anyway, but it's an extra bit of friction. Plus you probably can avoid issues where the binary doesn't decode properly because of version changes, different environment, etc.
- foobarian 9y agoIn Javaland BSON for production messages performs close to JDK serialization, and for debugging it's not hard to override the content types at runtime (or log the messages in readable form where they are getting serialized).