Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For someone saw CBOR, CBOR is kinda binary version of JSON, like MsgPack. CBOR is already mature as it is used in web browsers internally by a web standard [1] (and yes, Signed HTTP is in a controversy though...)

Because it is pretty much optimized for machine readability and lightness, one of usage is microcontrollers for IoT, with CBOR + CoAP(kinda HTTP for IoT), although I wouldn't say it is common yet, since CoAP needs IPv6.

[1]: https://wicg.github.io/webpackage/draft-yasskin-http-origin-...



I'd point towards WebAuthn[0] as a reason why browsers implement CBOR, since that's much more widely supported.

[0]: https://www.w3.org/TR/webauthn-1/#dependencies


I recently wanted to use something JSON-RPC'ish for communication between host PC and my microcontroller. I looked into CBOR/MessagePack as well as UBJSON.

I didn't find a CBOR/MessagePack nor UBJSON implementation that was microcontroller-friendly and easy to use.

In the end I ended up just using plain JSON. Easy to debug as you can easily see what's on the wire, easy to implement, relatively small code size.


Most CBOR implementations for MCUs tend to be a part of RTOSs, integrated and optimized for their own memory allocation libraries. But many of them are based on Intel's TinyCBOR: https://github.com/intel/tinycbor


You would probably reach for CoAP when your nodes are speaking 6LoWPAN but, there's nothing about CoAP that requires IPv6.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: