json2cbor

Crates.iojson2cbor
lib.rsjson2cbor
version2.0.0
sourcesrc
created_at2019-12-04 20:39:10.062133
updated_at2022-09-08 17:08:52.776255
descriptionConvert JSON to CBOR
homepage
repositoryhttps://github.com/Timmmm/json2cbor
max_upload_size
id186535
size12,637
Crates.io owners (github:edgeandnode:crates-io-owners)

documentation

README

JSON2CBOR

This repo contains two really simple programs to convert JSON to CBOR and vice versa. It does the transformation using serde-transcode.

Install

  1. Install Rust.
  2. cargo install json2cbor.

Use

json2cbor and cbor2json both take the same flags & arguments

Reads/writes to stdin/stdout by default

echo '{"foo":"bar"}' | json2cbor | cbor2json
# Output: {"foo":"bar"}

Read from an input file

json2cbor in.json

Write to an output file

echo '{"foo":"bar"}' | json2cbor -o out.cbor

Read & write to files

json2cbor -o out.cbor in.json

Get help

json2cbor --help
Commit count: 8

cargo fmt