Jsonifier Serialization: Design and Performance
Jsonifier serializes a reflection-registered C++ object in two passes: an exact-or-over size estimate, one buffer resize, then a single branch-light write pass that never checks capacity. Every byte the schema already knows (key names, quotes, colons, commas, indentation) is folded at compile time into packed integer constants and emitted with fixed-width stores, so the runtime work left is the data itself: strings, numbers and container lengths. This paper describes that design as it stands in include/jsonifier-incl/serializing/ (serializer.hpp, serialize_impl.hpp) and its helpers for strings (string_utils.hpp), integers (i_to_str.hpp) and floats (d_to_str.hpp).
Authors
- Chris Mandarino
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24796799
- Primary Topic
- Logic, programming, and type systems
- Type
- preprint