title: JSON in Qt using QVariantMap
body: <p>I would like to parse this JSON output in a symbian application:</p>
  
  <pre><code>[
      {"ID":"9","titel":"wouter","plaatsID":"2616","prio":"3"},
      {"ID":"8","titel":"pasta","plaatsID":"3780","prio":"3"},
      {"ID":"6","titel":"Muts prikken","plaatsID":"3780","prio":"2"
      {"ID":"5","titel":"doorplannen","plaatsID":"3840","prio":"2"}
      {"ID":"4","titel":"Gasfles","plaatsID":"3780","prio":"2"}
  ]
  </code></pre>
  
  <p>For this, I wrote following code, but I can't read the data. Other single JSON output it works fine, but a multiple output doesn't work:</p>
  
  <pre><code>     void start::finishedSlot(QNetworkReply * reply)
      {
          // Reading attributes of the reply
          // e.g. the HTTP status code
          reply-&gt;attribute(QNetworkRequest::HttpStatusCodeAttribute);
      reply-&gt;attribute(QNetworkRequest::RedirectionTargetAttribute);
      // see CS001432 on how to handle this
      // no error received?
      if (reply-&gt;error() == QNetworkReply::NoError)
      {
              QByteArray data = reply-&gt;readAll();
          bool ok;
          QVariantMap result = Json::parse(QString(data), ok).toMap();
  
          if(!ok) {
              qFatal("An error occurred during parsing");
              exit(1);
          }
          QMapIterator&lt;QString, int&gt; i(result);
          while (i.hasNext()) {
              i.next();
              cout &lt;&lt; i.key() &lt;&lt; ": " &lt;&lt; i.value() &lt;&lt; endl;
          }
  
      ui-&gt;log-&gt;setText("het gaat goed");
      }
      // Some http error received
      else
      {
       ui-&gt;log-&gt;setText("gaat NIET goed");
      }
      delete reply;
  }
  </code></pre>