cJSON icon indicating copy to clipboard operation
cJSON copied to clipboard

Ultralightweight JSON parser in ANSI C

Results 187 cJSON issues
Sort by recently updated
recently updated
newest added

Lines from 1514-1516 in function parse_array should be removed. These code will be sure the previous member of the child of cJSON object's. That means : the code of condition...

As suggested by @iMobs in #89. It is not guaranteed, that cJSON will ever support streaming, but if it will, here's some ideas on how it could be done. The...

enhancement

Currently JSON number is printed with upto 15 decimal places (e.g. 21.379983333333332) most of the time such long number is not needed and is a wastage of space in embedded...

enhancement

```` CJSON_PUBLIC(const char*) cJSON_Version(void) { static char version[15]; sprintf(version, "%i.%i.%i", CJSON_VERSION_MAJOR, CJSON_VERSION_MINOR, CJSON_VERSION_PATCH); return version; } ```` Suppose that two threads call `cJSON_Version` concurrently, there is a data race in...

Hello, With further checking, `cJSON_Print` will cause an internal heap leak, which is unknown. The current testing environment is under ESP-IDF v4.4. The `create_monitor` example is used. ESP32 code: ```...

When this library is used in a multithreaded application, a data race takes place on the global_error variable. cJSON_GetErrorPtr() ceases to be diagnostically applicable.

Some values expected to be initialized with NULL was being initialized with 0 triggering sparse warnings Also `DBL_EPSILON` on Linux GCC depends on `__DBL_EPSILON__` causing trouble on compilation.

There are some warnings and errors when using cppcheck to scan cjson v1.7.15 ![image](https://user-images.githubusercontent.com/26592885/192572573-ab53ee91-51ec-4638-aa5d-00c06d417918.png)

Attempting to build cJSON.c with arm-none-eabi-gcc 11.3.1 fails because int16_t etc is defined in stdint.h but there is no #include . Fix: Added #include to cJSON.c