28 C/C ++ open-source JSON library performance and standard compliance evaluation
There are a lot of C/C ++ JSON libraries in the workshop. It is a difficult choice.
[Nativejson-benchmark] (https://github.com/miloyip/nativejson-benchmark) should be the first open source project in history to evaluate 28 C/C ++ open source JSON libraries, it evaluated whether each library conforms to the JSON standard (RFC7159, ECMA-404), and tested the performance of each operation such as parsing, generating) time consumption, memory usage and other data, even the size of executable files is measured.
This project also hopes to improve the quality of the current or future JSON library by learning from each other.
Since each evaluation does not completely cover all data and software and hardware combinations, it is recommended that you perform tests on the required platform and data.
Here are some of the results for iMac (Corei5-3330S@2.70GHz) and clang 6.1 _ 1 64-bit. For more information, see here.
The higher the standard, the better ):
The lower the time for parsing to DOM, the better ):
The lower the memory, the better ):
The lower the time for DOM to generate JSON, the better ):
The lower the time for DOM to generate JSON with line breaks and indentation, the better ):
The smaller the size of the executable file, the better. parse JSON to DOM, and calculate the JSON type ):