Skip to content

Releases

Metajson 0.2

Choose a tag to compare

@matt-42 matt-42 released this 21 Jun 16:19

Hello All,

I'm happy to announce the second release of metajson, the json de/serializer I've been playing with for few weeks.

It includes:

  • Support of standard types: std::variant, std::optional and std::tuple
  • Generation of error messages, optimized for low overhead.
  • A benchmark on a large json file canada.json, taken from https://github.com/miloyip/nativejson-benchmark
  • Few bug fixes

From the benchmarks, the library seems to deserialize small objects faster than other libraries, and large objects ~10% slower than rapidjson. See some numbers below.

The plan for the future is to deliver monthly releases as long as you or I find potential improvements. Feel free to push features requests or issues.

$ ./canada                                                                                                                                               
Run on (4 X 1623.21 MHz CPU s)
metajson              11124831 ns   11124324 ns         63
bench_rapidjson       10114510 ns   10114179 ns         68
bench_nlohmann_json   46993265 ns   46991285 ns         15


$ ./simple_json                                                                                                                                          
Run on (4 X 1600.05 MHz CPU s)
Benchmark                    Time           CPU Iterations
----------------------------------------------------------
metajson                   292 ns        292 ns    2131339
bench_rapidjson            614 ns        614 ns    1139458
bench_nlohmann_json       1122 ns       1121 ns     624420

Feature complete and fast

Choose a tag to compare

@matt-42 matt-42 released this 05 Jun 18:07

This is the first release of the library. All the features are completed and the code have been optimized to beat the rapidjson library, #1 on the miloyip's benchmark https://github.com/miloyip/nativejson-benchmark.

I also made a script to generate a single header version, easier to install:
https://raw.githubusercontent.com/iodcpp/metajson/master/metajson.hh