News for hackers. Stuff that matters.
Re:JSON for Modern C++ version 3.10.0 by cibomahto on Thursday August 19, 2021 @08:17AM (#28232844)
For what it's worth, cJSON does support a (global) allocator override, using cJSON_InitHooks().

Here's what I use on ESP32 to push allocation to SPIRAM: https://gist.github.com/cibomahto/a29b6662847e13c61b47a194fa...

Re:JSON for Modern C++ version 3.10.0 by qalmakka on Friday August 20, 2021 @09:14AM (#28245560)
Yes, but I don't want to change the allocator for _all_ of cJSON - we often have to use third party libraries which rely on cJSON, shipped as binary blobs, which haven't been tested with that. Nlohmann gives you the ability to pick what allocator you want per instance instead globally, which I greatly prefer.