YES. Qt provides support for dealing with JSON data. JSON is a format to encode object data derived from Javascript, but now widely used as a data exchange format on the internet. The JSON support in Qt provides an easy to use C++ API to parse, modify and save JSON data. It also contains support for saving this data in a binary format that is directly "mmap"-able and very fast to access.
JSON is a format to store structured data. It has 6 basic data types:
A simple JSON document encoding a person, his/her age, address and phone numbers could look like:
JSON is a format to store structured data. It has 6 basic data types:
bool, double, string, array, object, nullThe text representation of JSON encloses arrays in square brackets ([ ... ]) and objects in curly brackets ({ ... }). Entries in arrays and objects are separated by commas. The separator between keys and values in an object is a colon (:).
A simple JSON document encoding a person, his/her age, address and phone numbers could look like:
{JSON support in Qt consists of these classes:
"FirstName": "John",
"LastName": "Doe",
"Age": 43,
"Address": {
"Street": "Downing Street 10",
"City": "London",
"Country": "Great Britain"
},
"Phone numbers": [
"+44 1234567",
"+44 2345678"
]
}
QJsonArray | Encapsulates a JSON array |
QJsonDocument | Way to read and write JSON documents |
QJsonParseError | Used to report errors during JSON parsing |
QJsonObject | Encapsulates a JSON object |
QJsonObject::const_iterator | QJsonObject::const_iterator class provides an STL-style const iterator for QJsonObject |
QJsonObject::iterator | QJsonObject::iterator class provides an STL-style non-const iterator for QJsonObject |
QJsonValue | Encapsulates a value in JSON |
No comments:
Post a Comment