I use cJSON in my program to convert my values to JSON and write it to file. Here is the example of my code:
void writeStructToFile(IOPipe this, struct struc
For a char* allocated cJSON_Print, it is said to use cJSON_FreePrintBuffer.