Thanks, yes it seems I was trying to read the reply twice and that's why I was getting that effect.
I will try your approaches with isMap and toMap. Just to again highlight what kind of problem I had,
for example the entry in the JSON file is smth like this:
"Key: "result" Value: QVariant(QVariantMap, QMap(("code", QVariant(qlonglong,
1) ) ) )"
after printing them as you suggested.
Now, what I am actually interested in, is the value of "code" which is 1. So, when I try to run
the following command:
it returns an empty string. Which seems to be due to the fact which we mentioned .....Qt Code:
if (results.contains("code")) qDebug()<<"***code***: "<<results.value("code");To copy to clipboard, switch view to plain text mode
So, you recommend to use isMatp and etc. right??? I will see that approach now, because my JSON
file has a loft of such nested QVariantMaps -- thanks again.
ps. Do you have maybe some samples on the web site or know links which show how to
(recursively, as it appears now) parse the whole JSON file ??? Thanks.
Bookmarks