VAT
3.0
Video Analysis Tool
|
A JSON data parser. More...
Typedefs | |
typedef QVariantMap | JsonObject |
typedef QVariantList | JsonArray |
Functions | |
template<typename T > | |
QByteArray | serializeMap (const T &map, bool &success) |
QVariant | parse (const QString &json) |
QVariant | parse (const QString &json, bool &success) |
QByteArray | serialize (const QVariant &data) |
QByteArray | serialize (const QVariant &data, bool &success) |
QString | serializeStr (const QVariant &data) |
QString | serializeStr (const QVariant &data, bool &success) |
void | setDateTimeFormat (const QString &format) |
void | setDateFormat (const QString &format) |
QString | getDateTimeFormat () |
QString | getDateFormat () |
A JSON data parser.
Json parses a JSON data into a QVariant hierarchy.
QString QtJson::getDateTimeFormat | ( | ) |
This method gets date(time) format to be used for QDateTime::toString If QString is empty, Qt::TextDate is used.
QVariant QtJson::parse | ( | const QString & | json | ) |
parse
Parse a JSON string
json | The JSON data |
QVariant QtJson::parse | ( | const QString & | json, |
bool & | success | ||
) |
parse
Parse a JSON string
json | The JSON data |
success | The success of the parsing |
QByteArray QtJson::serialize | ( | const QVariant & | data | ) |
This method generates a textual JSON representation
data | The JSON data generated by the parser. |
QByteArray QtJson::serialize | ( | const QVariant & | data, |
bool & | success | ||
) |
This method generates a textual JSON representation
data | The JSON data generated by the parser. |
success | The success of the serialization |
QString QtJson::serializeStr | ( | const QVariant & | data | ) |
This method generates a textual JSON representation
data | The JSON data generated by the parser. |
QString QtJson::serializeStr | ( | const QVariant & | data, |
bool & | success | ||
) |
This method generates a textual JSON representation
data | The JSON data generated by the parser. |
success | The success of the serialization |
void QtJson::setDateTimeFormat | ( | const QString & | format | ) |
This method sets date(time) format to be used for QDateTime::toString If QString is empty, Qt::TextDate is used.
format | The JSON data generated by the parser. |