I2O -Dienstprogramme I2O ist eine Sammlung von Filtern für die Konvertierung zwischen den von CXON Library implementierten Dateiformaten, die derzeit aus JSON und CBOR bestehen
$ 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 JSON Die Implementierung entspricht streng mit RFC8259 / ECMA-404 .
CBOR Die Implementierung entspricht RFC7049 .
I2O erfordert C++11 konformes Compiler. C++17 Konformer Compiler mit <charconv> ( P0067R5 ) wird für die beste Leistung empfohlen.
Die einzige Abhängigkeit ist neben der Standardbibliothek die CXON -Bibliothek.
I2O kann mit dem mitgelieferten Makefile auf POSIX -Systemen erstellt und installiert werden:
$ 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 Das Standard -Installationsverzeichnis ist /usr/local/bin und kann beispielsweise mit DESTDIR und prefix geändert werden:
$ 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 installieren CXON und I2O in ~/include und ~/bin jeweils.
Da CXON eine Nur-Header-Bibliothek ist, können Sie die Installation überspringen:
$ git clone https://github.com/oknenavin/cxon.git
$ git clone https://github.com/oknenavin/i2o.git
$ sudo make -C i2o CXXFLAGS= " ../cxon/src " installOder bauen Sie es einfach an Ort und Stelle:
$ 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 Jede Art von Beitrag (Feedback, Vorschläge, Code, Tests, Dokumentation usw.) ist willkommen.
Kontakt über GitHub (erstellen Sie ein Problem, auch wenn es sich nur um eine Frage oder einen Kommentar handelt) oder per E -Mail.
Unter der MIT -Lizenz verteilt. Weitere Informationen finden Sie LICENSE .
Github