json读取


Json::Value json_temp;
Json::Value pathroot;

pathroot["path"] = Json::Value("http://192.168.1.24:90/22.avi");
json_temp["position"] = Json::Value("0");
json_temp["action"] = Json::Value("addVideo");
json_temp["pathList"] = pathroot;
CString tsd(json_temp["action"].asCString());
AfxMessageBox(tsd);
//char* msgsend ="\{\"position\":0,\"action\":\"addVideo\",\"pathList\":[{\"path\":\"http:\/\/192.168.1.24:9000\/examples\/22.avi\"}]}";
char* msgsend ="\{\"currentPath\":\"http:\/\/192.168.1.24:90\/aa.jpg\",\"action\":\"addPhoto\",\"type\":\"3\",\"pathList\":[{\"path\":\"http:\/\/192.168.1.24:90\/aa.jpg\"}]}";
// m_pSocket->SendTo(msgsend,strlen(msgsend),m_strPortc,m_ipAddr,0);

// pUDPServer.SendMsg(msgsend,strlen(msgsend),CString2char(m_ipAddr),m_strPortc);

猜你喜欢

转载自www.cnblogs.com/hshy/p/10991896.html