| 65 | } |
| 66 | |
| 67 | static bool isBinaryJson(const QByteArray &data) |
| 68 | { |
| 69 | decltype(QJsonDocument::BinaryFormatTag) tag = QJsonDocument::BinaryFormatTag; |
| 70 | return memcmp(data.constData(), &tag, sizeof(QJsonDocument::BinaryFormatTag)) == 0; |
| 71 | } |
| 72 | QJsonDocument requireDocument(const QByteArray &data, const QString &what) |
| 73 | { |
| 74 | if (isBinaryJson(data)) |