ESP32 & cJSON - Fail to create large cJSON arrays
Posted: Fri Apr 03, 2020 2:28 pm
Hello!
I am filling a cJSON Array with AddNumberToObject() function. At first it works fine, but at some point the add_item_to_object() function within AddNumberToObject() begins to return NULL, thus not writing the number and producing afterwards the error "LoadProhibited", when dereferencing the null pointer (char *) to this Array rendered as text.
The cJSON Array I am trying to create is quite large: 3200 times AddNumberToObject() function.
Is there maybe a maximum size for a cJSON array? Or am I simply running out of memory in ESP32?
Any help would be really appreciated.
I am filling a cJSON Array with AddNumberToObject() function. At first it works fine, but at some point the add_item_to_object() function within AddNumberToObject() begins to return NULL, thus not writing the number and producing afterwards the error "LoadProhibited", when dereferencing the null pointer (char *) to this Array rendered as text.
The cJSON Array I am trying to create is quite large: 3200 times AddNumberToObject() function.
Is there maybe a maximum size for a cJSON array? Or am I simply running out of memory in ESP32?
Any help would be really appreciated.