cJSON获取int值
作者:互联网
cJSON *cjsonArr = cJSON_GetObjectItem(cjosnDate, "params"); // cjosnDate为上述的cjson数据 cJSON *cjsonTmp = cJSON_GetArrayItem(cjsonArr, 0); int num = cjsonTmp->valueint; cout << "num1 = " << num << endl; cjsonTmp = cJSON_GetArrayItem(cjsonArr, 1); num = cjsonTmp->valueint; cout << "num2 = " << num << endl;
标签:cjsonTmp,获取,cJSON,int,cjosnDate,cjsonArr,valueint 来源: https://www.cnblogs.com/tingtaishou/p/15040857.html