This repo contains two really simple programs to convert JSON to CBOR and vice versa. It does the transformation using serde-transcode.
- Install Rust.
cargo install json2cbor.
json2cbor and cbor2json both take the same flags & arguments
echo '{"foo":"bar"}' | json2cbor | cbor2json
# Output: {"foo":"bar"}json2cbor in.jsonecho '{"foo":"bar"}' | json2cbor -o out.cborjson2cbor -o out.cbor in.jsonjson2cbor --help