[Study Project] A memory-optimized JSON data structure

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

JetBrains - Tell us how you use coding tools. You may win a prize!
Are you a developer or a data analyst? Share your thoughts about your coding tools in our short survey and get a chance to win prizes!
surveys.jetbrains.com
featured
Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
  1. lfjson

    A memory-optimized and data-oriented JSON library written in C++

    https://github.com/gaujay/lfjson Your mandatory bi-weekly JSON news is here! JK, but let's cut to the chase: this is actually not a new JSON serializer. I wanted to explore some allocator-related topics and noticed (almost) all JSON libraries put emphasis on speed, not memory usage (like in this article).

  2. JetBrains

    Tell us how you use coding tools. You may win a prize! Are you a developer or a data analyst? Share your thoughts about your coding tools in our short survey and get a chance to win prizes!

    JetBrains logo
  3. xxHash

    Extremely fast non-cryptographic hash algorithm

    But what's the catch, you're thinking ? Well, it is a bit slower than its counterparts when it comes to deserializing (and marginally faster for serializing). To achieve smaller footprint, it uses a few tricks and notably a custom hash table to deduplicate strings. This comes at a cost of course (even when featuring xxHash to speed things up), but keeps the slowdown reasonable (I think).

  4. glaze

    Extremely fast, in memory, JSON and reflection library for modern C++

    Interesting research. I've been working on a library that reads directly into C++ memory, Glaze, so the JSON library has practically zero heap overhead. You just have the memory cost of your buffer and the C++ that you plan to populate. For example, if you want to read into a `std::map`, then Glaze will pretty much be as efficient in memory cost as the C++ type can store its memory.

  5. json

    JSON for Modern C++

    I think nlohmann-json tried the 'shrink' route but got pretty bad perf penalty for it. For my lib I used the same strategy as RapidJSON and deserialized data in a temp buffer, before mem-copying it to its destination (on reaching array/object end). This is actually faster than trying to manage memory holes created by vector growth.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • The Probability of a Hash Collision

    1 project | news.ycombinator.com | 27 Jun 2025
  • DeadLock - Parsing JSON

    1 project | dev.to | 7 Jun 2025
  • Tools and Demo Based on Existing .NET JSON Schema Components

    7 projects | dev.to | 22 May 2025
  • 🚀 Zyn: Modern C++ Project Management Made Effortless

    2 projects | dev.to | 17 May 2025
  • JSON for Modern C++ 3.12.0 released

    1 project | news.ycombinator.com | 11 Apr 2025

Did you know that C++ is
the 7th most popular programming language
based on number of references?