PJK / libcbor

CBOR protocol implementation for C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improvements for examples

akallabeth opened this issue · comments

  • Some of the examples are quite useful to debug binary dumps. To allow to dump a CBOR that does not start at the beginning of the file, some offset would be handy for readfile and cbor2cjson`
  • cbor2cjson does not convert Bytestring values. One possible way would be to convert to hex and set as string.

I´ve created a private branch with these things fixed for my use case here: https://github.com/akallabeth/libcbor/tree/offset_read
ping me if interested for upstream, I´ll create a pr.

Hi @akallabeth, thanks for the suggestion! I think I would prefer to keep the examples simple, they're meant to be easy to follow, not comprehensive or necessarily useful as tools.

If you end up evolving them into a utility/tool, please LMK, I'd be happy to reference them in this repo!