Activity for Dan Azu

  • Dan Azu Dan Azu posted a comment on discussion Open Discussion

    Trying to send a very simple JSON string: The code i've written to do this: double num = 100; char *string_out; cJSON *bace = cJSON_CreateObject(); cJSON *mynum = NULL; mynum = cJSON_CreateNumber(num); cJSON_AddItemToObject(bace,"mynumber",mynum); cJSON_AddStringToObject(bace, "Message", "Hello" ); string_out= cJSON_PrintUnformatted(bace); printf(" \n "); printf(string_out); cJSON_Delete(bace); The output i receive is: Any ideas on why this is not working? I aslo tried the exmaple print code from...

1