Solved JSON References
-
I'm working with JSON in Qt. The following code works fine :
QJsonObject o; QJsonValueRef r = o["value"]; r = 3 ; qDebug() << o ; // QJsonObject({"value":3})
Let's say I want to reference an object now :
QJsonObject o; o["test"] = QJsonObject(); QJsonValueRef r = o["test"]; r["value"] = 3;
That doesn't work because there is no operator[] !
Is there a way to to modify o given r ? -