On 06/15/2012 09:28 PM, Robert Kulagowski wrote:
> Can someone provide an example of code that would let me get access to
> the channel information that's in the ChanInfo array and the "version"
> for example?
I didn't test the code, but I would do something like that:
QVariant devType;
foreach (devType, result["DeviceTypes"].toList()) {
qDebug() << "Device: " << devType.toString();
QVariantMap devInfo = result[devYype.toString()].toMap();
qDebug() << " - Version:" << devInfo["version"].toString();
qDebug() << " - Chan data:";
QVariant tmp;
foreach (tmp, devInfo["ChanData"].toList()) {
QVariantMap chanData = tmp.toMap();
qDebug() << " - station id:" << chanData["stationid"].toString();
qDebug() << " - call sign:" << chanData["callsign"].toString();
// same for url and channel
}
}
Cheers
Flavio
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QJson-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qjson-devel