libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
A couple of pointers for you to start with:
If you just want to peek under the hood, have a look at:
If you want to implement your own decoder or see how the default one is made:
For details on encoding and packing (could be useful when porting to exotic platforms):
Manipulation routines for particular types:
Please refer to the repository