can any one tel how to use qjsonobject in the qt program for access the object in json file ......? ..
if any one give example program then it would be very helpful???????
can any one tel how to use qjsonobject in the qt program for access the object in json file ......? ..
if any one give example program then it would be very helpful???????
QJson is a 3rd party add on for Qt. That page has examples.
QJsonDocument is a Qt5 class in the Qt JSON Support
Which one have you tried to use? Where did you get stuck?
can any one tel how to use qjsonobject in the qt program for accessing the object inside the .json file??
any example program....it wil be helpful
Qt Code:
QJsonDocument doc = QJsonDocument::fromJson(f.readAll()); QJsonObject object = doc.object();To copy to clipboard, switch view to plain text mode
nabeel (5th September 2013)
how to use qjsonarray in qt program....how to access the Qjsonvalues in .json files using qjsonarray.....? example program will be most helpful
.
Or this one? If do not read the replies why bother asking?
{
"schema": {
"friends": {
"type": "array",
"items": {
"type": "object",
"title": "Friend",
"properties": {
"nick": {
"type": "string",
"title": "Nickname",
"required": true
},
"gender": {
"type": "string",
"title": "Gender",
"enum": [ "male", "female", "alien" ]
},
"age": {
"type": "integer",
"title": "Age"
}
}
}
}
},
"value": {
"friends": [
{ "nick": "tidoust", "gender": "male", "age": 34 }
]
}
}
i want access the values of above .json file using QjsonObject or Qjson array.....how to use the qjsonobject..or qjsonarray for accessing the values.....?
thank for your patience
Bookmarks