CBOR diagnostic utilities
This little set of tools provides a number of command line utilities for converting to and from CBOR and its diagnostic notation as well as some libraries for this in the Ruby language.
gem install cbor-diag
Command line utilities
Specifically, the tools...
...do pretty much what you would expect them to do, given these definitions:
- "cbor" is a single binary CBOR data item.
- "cborseq" is a sequence of zero or more binary CBOR data items.
- "diag" is CBOR's diagnostic notation.
- "json" is JSON.
- "neatjson" is a neater form of JSON.
- "pretty" is the pretty-printed representation of binary CBOR as used by cbor.me.
- "yaml" is YAML.
Output is to stdout, input from stdin or files given as command line
json2cbor.rb also has a
These commands have a .rb suffix in their names to avoid conflicts: versions of the
same functionality are available under similar names in other CBOR
json2cbor in the
- "cbor-pure" is a pure-Ruby implementation of CBOR, with some diagnostic capabilities. It is aided by "half.rb" for 16-bit IEEE 754 floating point numbers (which Ruby strangely doesn't directly support).
- "cbor-diag-parser" is a parser for CBOR's diagnostic notation and the heart of diag2cbor.rb and diag2pretty.rb. (Source is in treetop; compiled .rb also included.)
- "cbor-diagnostic" is a dumper for CBOR's diagnostic notation.
- "cbor-pretty" is a pretty-printer for binary CBOR.
No documentation; use the source, for now (the above command line utilities should show the basic usage).