Something about Parsing JSON with QT and VS2010
QByteArray enUrl = "http://mobilecdn.kugou.com/new/app/i/search.php?keyword=walking&cmd=300&pagesize=100";
QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(enUrl)));
QByteArray musicJson = reply->readAll();
value =engine.evaluate("(" + QString(musicJson) + ")");
the problem is :
musicJson have data, but when I parsing, the value is empty;
do somebody have the same problem?
There is one of my favourite libraries - QJson. It allows to work with JSON on the QVariant* level. Read, write, serialize, etc.
Project link: http://qjson.sourceforge.net/