I2O
is a collection of filters for conversion between the file formats
implemented by CXON
library,
which currently consist of JSON
and CBOR
$ json2cbor < in.json > out.cbor # JSON to CBOR
$ cbor2json < in.cbor > out.json # CBOR to JSON
$ cat in.cbor | cbor2json | json2json > out.json # CBOR to pretty JSON
The implementation strictly complies with RFC8259
/ ECMA-404
.
The implementation complies with RFC7049
.
I2O
requires C++11
compliant compiler.
C++17
compliant compiler with <charconv>
(P0067R5
) support
is recommended for best performance.
The only dependency, besides the standard library is the CXON
library.
I2O
can be built and installed using the included makefile on POSIX
systems:
$ git clone https://github.com/oknenavin/cxon.git
$ sudo make -C cxon install
$ git clone https://github.com/oknenavin/i2o.git
$ sudo make -C i2o install
The default installation directory is /usr/local/bin
and can be altered with
DESTDIR
and
prefix
variables, for example:
$ git clone https://github.com/oknenavin/cxon.git
$ sudo make -C cxon DESTDIR=~ prefix=/. install
$ git clone https://github.com/oknenavin/i2o.git
$ sudo make -C i2o DESTDIR=~ prefix=/. install
will install CXON
and I2O
in ~/include
and ~/bin
respectively.
Because CXON
is a header-only library, you may skip its installation:
$ git clone https://github.com/oknenavin/cxon.git
$ git clone https://github.com/oknenavin/i2o.git
$ sudo make -C i2o CXXFLAGS="../cxon/src" install
or just build it in place:
$ git clone https://github.com/oknenavin/cxon.git
$ git clone https://github.com/oknenavin/i2o.git
$ make -C i2o CXXFLAGS="../cxon/src" # the binaries are in i2o/.out
Any kind of contribution (feedback, suggestions, code, tests, documentation, etc.) is welcome.
Contact via GitHub (create an issue even it's just a question or comment) or
via mail.
Distributed under the MIT license. See LICENSE
for more information.
GitHub