[qt][json]QJsonArray QJsonObject 转QString

                    QJsonArray timeWindow = it_obj.value("timeWindow").toArray();
                    QJsonDocument doc;
                    doc.setArray(timeWindow);
                    QString timeWindow_str = QString::fromUtf8(doc.toJson(QJsonDocument::Compact).constData());
                    QJsonObject timeWindow = it_obj.value("timeWindow").toObject();
                    QJsonDocument doc;
                    doc.setObject(timeWindow);
                    QString timeWindow_str = QString::fromUtf8(doc.toJson(QJsonDocument::Compact).constData());

你可能感兴趣的:(qt,开发语言,c++)