daschfg

Results 7 comments of daschfg

I'm not familiar with FreeRTOS, but in general: If you don't use `cJSON_InitHooks`, cJSON will per default call the standard functions `malloc`, `realloc` and `free`. So I guess the call...

I don't think this is an issue with cJSON. Just a wild guess: Depending on your STM32 model, maybe this could be related to caching? Are you sure your data...

Hi @youngie, normally cJSON shouldn't crash on invalid input. But your system could crash if you use an invalid output. How do you call `cJSON_Parse` and with which input? Are...

Interesting find. Basically, whats causing the infinite loop here is a circular reference after adding the same item twice. I boiled the POC down a bit: cJSON* root = cJSON_CreateObject();...

So with the call to `cJSON_ReplaceItemInArray`, you're replacing the first entry in the array with a reference to the whole array, thus creating a circular reference. This is somewhat similar...

For easier reference, a boiled down POC: const char* input = "{ \"Width\": \"100\" }"; cJSON* root = cJSON_Parse(input); cJSON* widthObj = cJSON_GetObjectItem(root, "Width"); double width = cJSON_GetNumberValue(widthObj); // Trying...

This is expected behaviour. See Readme: > By default, characters in the input string that follow the parsed JSON will not be considered as an error. If you want it...