void CConnectHvCloud::TestJson()
{
CString str;
//str = "{\"randomflag\":\"9948\",\"isauthorize\":\"1\",\"leftAmount\":\"\",\"endTime\":\"\",\"isNewUser\":\"\",\"text\":{\"code\":\"0\",\"result\":\"junit-test\",\"documents\":[{\"text\":\"44\"},{\"text\":\"444\"},{\"text\":\"44\"},{\"text\":\"44\"}]}}";
str = "{\"endTime\":\"\", \"isNewUser\" : \"\", \"isauthorize\" : \"0\", \"leftAmount\" : \"0\", \"randomflag\" : \"7075\", \"text\" : {\"code\":\"0\", \"result\" : \"junit-test\", \"documents\" : [{\"text\":\"汉王科技\"}, { \"text\":\"国粹\" }, { \"text\":\"互联网业务\" }, { \"text\":\"手写体识别\" }]}}";

//CString strKey;
//strKey.Format(_T("\"%s\":"), _T("text"));
//int nLocal = str.Find(strKey);
//if (nLocal == -1)
//{
// //没有找到该key
// return;
//}
//int nValueStart = nLocal + strKey.GetLength() + 1;
//int nValueEnd = str.GetLength() - 2;
//CString Value = str.Mid(nValueStart, nValueEnd - nValueStart);

//使用jsonlib 来解析稍微复杂json
string strValue(str.GetBuffer(str.GetLength()));

Json::Reader reader;
Json::Value value;
vector<CString> aRetDataVec;
reader.parse(strValue, value);

//code
string strTemp = value["isauthorize"].asString();
int nRes = _ttoi(strTemp.c_str());