Unexpected Output from cJSON_Print

physiii
Posts: 23
Joined: Fri Nov 17, 2017 9:37 pm

Unexpected Output from cJSON_Print

Postby physiii » Mon Jan 06, 2020 2:53 am

Can anyone tell me why I always get the character 'g' as the value when using cJSON_Print, cJSON_PrintUnformatted, etc? Not sure when this started happening or why.

This:

Code: Select all

printf("Test cJSON: %s\n",cJSON_PrintUnformatted(cJSON_Parse("{\"test\":123,\"test2\":321}")));
Gives:

Code: Select all

Test cJSON: {"test":g,"test2":g}

Who is online

Users browsing this forum: Bing [Bot], Hello1024, veso266 and 179 guests