18 #include <QJsonDocument> 51 name =
new QString(
"");
79 QByteArray array (json.toStdString().c_str());
80 QJsonDocument doc = QJsonDocument::fromJson(array);
81 QJsonObject jsonObject = doc.object();
107 QJsonDocument doc(*obj);
108 QByteArray bytes = doc.toJson();
110 return QString(bytes);
115 QJsonObject* obj =
new QJsonObject();
116 if(
name !=
nullptr && *
name != QString(
"")){
120 obj->insert(
"index", QJsonValue(
index));
123 obj->insert(
"sampleRate", QJsonValue(
sample_rate));
132 obj->insert(
"volume", QJsonValue(
volume));
201 bool isObjectUpdated =
false;
203 if(
name !=
nullptr && *
name != QString(
"")){ isObjectUpdated =
true;
break;}
210 return isObjectUpdated;
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)