title: how to decode json in qt
body: <p>i want to decode following json with qt:</p>
  
  <pre><code>{
   "user": {
    "name": "string"
   }
  }
  </code></pre>
  
  <p>i'm tried to do it with this code, but does not work:</p>
  
  <pre><code>QJsonDocument jsonResponse = QJsonDocument::fromJson(result.toUtf8());
  QJsonObject jsonObject = jsonResponse.object();
  QJsonArray jsonArray = jsonObject["user"].toArray();
  foreach (const QJsonValue &amp; value, jsonArray)
          {
              QJsonObject obj     = value.toObject();
              url          = obj["name"].toString();
          }
  </code></pre>