|
- QRegExp toFindfileVersion("\"fileVersion\":(\\d+)");
- //QStringList listFileVersion;
- toFindfileVersion.indexIn(responseBody, 0);
- //int pos = 0;
- //while ((pos = toFindfileVersion.indexIn(responseBody, pos)) != -1)
- //{
- // listFileVersion << toFindfileVersion.cap(1);
- // pos += toFindfileVersion.matchedLength();
- //}
- responseBody.replace(toFindfileVersion, "\"fileVersion\":\"\\1\"");
复制代码 把下面的json串- {"result":{"resultCode":"0","InfoList":[{"fileVersion":1514682649480225715},{"fileVersion":1514682649480221234}]}}
复制代码 替换为- {"result":{"resultCode":"0","InfoList":[{"fileVersion":"1514682649480225715"},{"fileVersion":"1514682649480221234"}]}}
复制代码 |
|