Alan Wang

Results 87 comments of Alan Wang

@SLDiggie Thanks your reporting, the reason why the tail node is not added in the cJSON struct is that we value space very much, as you said, which is not...

@SLDiggie - question1: "name_c2" will be completely missing from objC due to this issue > this issue has been fixed by #456 , and I have tested your case, it...

Error handling makes sense, I like the demo1, when the input string is an invalid json string, the parse function should tell us where the problem is. But I can't...

Hi @zzqcn , will you submit a PR?

@mandi-china could you provide your environment(version, os, compiler...)? and does `free` function works well in your system?

> another problem: > ![HQRPEM 2 `MY7HU{C)0MEIT](https://user-images.githubusercontent.com/17793782/94008296-5d18f700-fdd5-11ea-9d70-b372e7febc60.png) > > i just wonder why this happen? (in array i have two items, but it can only print one) you shouldn't add...

> In my code, i use cjson like this : > > cJSON *monitor = cJSON_Parse(payload); > > cJSON *p = monitor; > saveDevicedZoneInfoProfile(p); //in this function i just get...

The problem lies in this line: `cJSON_AddItemToObject(obj, "zoneList", tmp)`, when you delete the obj, the `tmp` was been deleted too, but delete `monitor` will cause delete `tmp` again. You should...

@mandi-china you are right, `cJSON_AddItemReferenceToArray` could solve this problem, and it's better than `duplicate`.

README provides detailed description: https://github.com/DaveGamble/cJSON#arrays . so this issue could be closed?