" \"Herausgeber\": \"Xema\","
" \"Nummer\": \"1234-5678-9012-3456\","
" \"Deckung\": 2e+6,"
" \"Währung\": \"EURO\","
" \"Inhaber\": {"
" \"Name\": \"Mustermann\","
" \"Vorname\": \"Max\","
" \"männlich\": true,"
" \"Hobbys\": [ \"Reiten\", \"Golfen\", \"Lesen\" ],"
" \"Alter\": 42,"
" \"Kinder\": [],"
" \"Partner\": null"
" }"
"}";
QJsonDocument d = QJsonDocument::fromJson(str.toUtf8());
qWarning() << d.isNull();
QString str = "{"
" \"Herausgeber\": \"Xema\","
" \"Nummer\": \"1234-5678-9012-3456\","
" \"Deckung\": 2e+6,"
" \"Währung\": \"EURO\","
" \"Inhaber\": {"
" \"Name\": \"Mustermann\","
" \"Vorname\": \"Max\","
" \"männlich\": true,"
" \"Hobbys\": [ \"Reiten\", \"Golfen\", \"Lesen\" ],"
" \"Alter\": 42,"
" \"Kinder\": [],"
" \"Partner\": null"
" }"
"}";
QJsonDocument d = QJsonDocument::fromJson(str.toUtf8());
qWarning() << d.isNull();
To copy to clipboard, switch view to plain text mode
See if that works for you and then replace str.toUtf8() through your readAll().
Bookmarks