CJSON 下载地址以及介绍:http://sourceforge.net/projects/cjson/
bool ParseResourceString(CString StrRes, std::vector<std::string>& VecImgUrl,\
std::string& VideoUrl)
{
cJSON* JsonObj=cJSON_Parse(StrRes);
if (!JsonObj)
{
CString info;
info.Format("Json Error before: [%s]",cJSON_GetErrorPtr());
HT_DebugOutCString(info);
return false;
}
if (cJSON_Array != JsonObj->type)
{
HT_DebugOutCString(CString("CJSON NOT AN Array"));
return false;
}
int size = cJSON_GetArraySize(JsonObj);
for (int index = 0; index < size; index++)
{
cJSON* item = cJSON_GetArrayItem(JsonObj, index);
if (NULL == item)
{
HT_DebugOutCString(CString("CJson item null"