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

Code below: float a = 0.00001; cJSON *root = cJSON_CreateObject(); cJSON_AddNumberToObject(root, "a", a); printf("%s\n", cJSON_Print(root)); Maybe it will print: { "a": 9.9999997473787516e-06 } But that's not what we really want,...

I'm wondering why there is no function like `cJSON_bool cJSON_AddItemReferenceToObjectCS(cJSON *object, const char *string, cJSON *item)` similar to `cJSON_bool cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item)` and `cJSON_bool cJSON_AddItemReferenceToObject(cJSON *object,...

Hello everyone, I managed to parse a 40kB JSON file and I can even cJSON_Print the object to get the minified version of it. Unfortunately, trying to get an item...

I think it should return true when the pointer is null CJSON_PUBLIC(cJSON_bool) cJSON_IsNull(const cJSON * const item) { if (item == NULL) { return true; } return (item->type & 0xFF)...

need discussion

For one of my projects, I keep a cJSON representation of a data structure that syncs with remote source. I common problem in I my experience. Sometimes, I need to...

Hi, anybody have meet this issue before? this funtion(cJSON_SetStrValue) is replaced by someone else? (base) ubuntu@ubuntu-XPS-8930:~/Downloads/HIVIEW/fw/cjson/test$ nm /usr/local/lib/libcjson.so |grep cJSON_SetStrValue (base) ubuntu@ubuntu-XPS-8930:~/Downloads/HIVIEW/fw/cjson/test$

Hi cJSON team, I'm wondering if is it possible to parse an input stream. For example, if I'm receiving data from a socket, I have to wait and collect the...

cJSON_Create*Array() can create empty arrays with count == 0 now.

` char* data = cJSON_Print(value); printf(data) ` The print result is `"2021-10-18"` What i expect is `2021-10-18`

In the sub function print_number(), i saw that "number_buffer" was filled with 5.30498947741318e-315 when item->valuedouble = 1