QJsonDocument doc = QJsonDocument::fromJson(jsonData); if (doc.isNull()) { QJsonParseError error = doc qWarning() << "Parse error at " << error.offset << ":" << error.errorString(); return; }
QString errorStr = error.errorString();This code is part of the Qt5Core package library.