cJSON_Print会申请内存,使用完后要free掉。 char* pstr = cJSON_Print(json); .... free(pstr); 转载于:https://www.cnblogs.com/sbchen/p/9969961.html