libmir / mir-ion

Ion, JSON, YAML, CSV, CBOR and Msgpack serialization framework
Apache License 2.0
14 stars 6 forks source link
amazon-ion csv dlang ion json msgpack serialization yaml

Dub version Dub downloads License codecov Build Status CircleCI Ion Test Status

Mir Ion

Mir Ion serialization engine supports

Documentation

You can find the documentation for this library here. Additionally, for examples of the Ion format, you can check the Ion Cookbook

Benchmarks

kostya JSON benchmarks

ARM64

Twitter data set

Test data from nativejson-benchmark

-------------------------------------------------
Binary Ion writing      0.601 GB/s
     is equivalent of   1.598 GB/s for JSON

JSON    -> binary Ion   1.16 GB/s

MsgPack -> binary Ion   0.841 GB/s
     is equivalent of   1.321 GB/s for JSON

Ion is 96% smaller then minimized JSON
   and 69% smaller then MsgPack
- - - - - - - - - - - - - - - - - - - - - - - - -
processed file: benchmark/twitter.json
number of iterations: 2000
os: 64bit osx
-------------------------------------------------

Kostya data set

Test data from kostya/benchmarks.

-------------------------------------------------
Binary Ion writing      0.251 GB/s
     is equivalent of   1.063 GB/s for JSON

JSON    -> binary Ion   0.6 GB/s

MsgPack -> binary Ion   0.309 GB/s
     is equivalent of   1.098 GB/s for JSON

Ion is 134% smaller then minimized JSON
   and 19% smaller then MsgPack
- - - - - - - - - - - - - - - - - - - - - - - - -
processed file: /tmp/1.json
number of iterations: 10
os: 64bit osx
-------------------------------------------------

Exceptions

Mir Ion internals are @nogc and almost all are preallocated. If DIP1008 is enabled, then the parsing exception will contains additional information about error location in the file and last occured key.

Feature Status