Library for decoding and encoding Concise Binary (cbor) Data
$ cargo install cbd
Help:
$ cbd --help
Usage: cbd [OPTIONS]
Options:
-e, --encode
-b, --base64
-h, --help Print help
Decode CBOR into JSON:
$ cat file.cbor | cbd
{"key": "value"}
Decode base64 encoded CBOR into JSON:
$ echo 'oWNrZXlldmFsdWU' | cbd
{"key": "value"}
Encode JSON into CBOR:
$ cat file.json | cbd -e
?ckeyevalue
Encode JSON into base64 encoded CBOR:
$ cat file.json | cbd -e --base64
oWNrZXlldmFsdWU