QJson parsing without quotation marks
-
Example QByteArray (ba) looks like:
{
"testA": "1234",
"testB": 5678,
}Parsing code:
QJsonDocument jsonResponse = QJsonDocument::fromJson(ba);
QJsonObject tokenObj = jsonResponse.object();
testA= tokenObj["testA"].toString();
testB = tokenObj["testB"].toString();testA properly returns "1234" while testB returns ""
Any ideas are welcome, thanks in advance!