You can try rapidjson .
It is optimized for memory usage and performance.
Using the initu-parsing option (i.e., changing the original parsing line), it takes only 16 bytes for the JSON value for storing the DOM in a 32-bit architecture. String values ββwill use pointers pointing to the modified source string.
I expect memory usage to be much less.
Quickjson, on the other hand, also supports SAX-style parsing. If the application just needs to go through the JSON file from start to finish (for example, to make some statistics), then the SAX API will be even faster and there will be very little memory consumption (software stack + maximum length of the string value).
source share