Show HN: Cjson.cpp, the new fastest-ever (constexpr) JSON parser

rfgplk2 pts0 comments

Howdy.This is a fully constexpr (mostly, the mapping + vector marshalling code isn t) JSON parsing library for C++23/26. Based off of my preliminary benchmarks it s around 30-80% faster in parsing json (of any form) compared to the fastest libraries I could find (simdjson/Glaze). In serialization DOM manipulation (which is mostly what I ve written this for), it s outright 3-10x faster (depending on the doc). The only weak(ish) spot is the fact that it parses number heavy jsons slightly worse (it s double parser isn t too heavily optimized) plus it suffers (a bit) on super tiny inputs (sub 100ish bytes).The other important feature is the fact that the _whole_ library is constexpr, allowing you to do full json parsing + mutations at compiletime, which is especially useful for build system dispatching via #embed.

json constexpr parsing fastest parser mostly

Related Articles