【发布时间】:2014-07-12 01:59:15
【问题描述】:
在Qt的JSON实现中,QJsonObject类中,有两种操作符的实现(文档here):
QJsonValue QJsonObject::operator[](const QString & key) const;
QJsonValueRef QJsonObject::operator[](const QString & key);
首先,返回QJsonValueRef 与返回QJsonValue 相比有什么优势?其次,如果我只是说root['time'],其中root 是QJsonObject,会返回哪个值?
【问题讨论】: