Questions tagged [qjsonobject]

The QJsonObject class encapsulates a JSON object, where the keys are unique strings and the values are represented by a QJsonValue.

Description

The QJsonObject class encapsulates a JSON object.

A JSON object is a list of key value pairs, where the keys are unique strings and the values are represented by a QJsonValue.

A QJsonObject can be converted to and from a QVariantMap. You can query the number of (key, value) pairs with size(), insert(), and remove() entries from it and iterate over its content using the standard C++ iterator pattern.

QJsonObject is an implicitly shared class, and shares the data with the document it has been created from as long as it is not being modified.

You can convert the object to and from text based JSON through QJsonDocument.

Link

qt-project

47 questions
0
votes
0 answers

QJsonObject insert : error after remove()

When I use QJsonObject.insert() and pass a QJsonObject (which calls remove() before) as a parameter, it doesn't work well. I think it is more clear to post the code here: QJsonObject mainObj = myProJsonDoc.object(); QJsonObject modulesObj =…
-1
votes
1 answer

parse json data in c++ with Qt library

I have exactly following json data as follows: [ { "id":"01323", "name":"Json Roy", "contacts":[ "CONTACT1=+917673267299", "CONTACT2=+917673267292", "CONTACT3=+917673267293", "CONTACT4=+917673267294", ] } ] I want to…
Excoder
  • 37
  • 1
  • 7
1 2 3
4