-
Notifications
You must be signed in to change notification settings - Fork 290
Description
The description says that this library never allocates more memory than it needs. That's nice but what is needed? Other JSON parser libs make explicit statements about whether they allocate any memory for the parsed data. This one looks like it needs to allocate memory for all parsed values, including all strings (providing a zero-terminated copy) and also those object keys that I'm not interested in. I'm looking for a JSON parser to use on an ESP32 microcontroller in conjunction with MQTT and WiFi. There is some RAM available but I'd like to keep its use for this task to a minimum.
I don't need the original JSON string anymore after parsing, so destroying it and providing pointers into it would be fine with me (adding terminating zero and shifting backslash sequences in-place).
If that's not supported, would I be able to prevent running out of memory by limiting the accepted JSON string length so something reasonable for my application?