18 #include <QJsonDocument> 57 title =
new QString(
"");
72 if(
title !=
nullptr) {
83 QByteArray array (json.toStdString().c_str());
84 QJsonDocument doc = QJsonDocument::fromJson(array);
85 QJsonObject jsonObject = doc.object();
111 QJsonDocument doc(*obj);
112 QByteArray bytes = doc.toJson();
114 return QString(bytes);
119 QJsonObject* obj =
new QJsonObject();
121 obj->insert(
"index", QJsonValue(
index));
123 if(
id !=
nullptr && *
id != QString(
"")){
124 toJsonValue(QString(
"id"),
id, obj, QString(
"QString"));
127 obj->insert(
"uid", QJsonValue(
uid));
129 if(
title !=
nullptr && *
title != QString(
"")){
205 bool isObjectUpdated =
false;
208 if(
id !=
nullptr && *
id != QString(
"")){ isObjectUpdated =
true;
break;}
210 if(
title !=
nullptr && *
title != QString(
"")){ isObjectUpdated =
true;
break;}
214 return isObjectUpdated;
void setReport(SWGChannelReport *report)
qint32 getDeltaFrequency()
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
bool m_delta_frequency_isSet
SWGChannelReport * report
virtual SWGChannel * fromJson(QString &jsonString) override
virtual QJsonObject * asJsonObject() override
void setIndex(qint32 index)
virtual void fromJsonObject(QJsonObject &json) override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setDeltaFrequency(qint32 delta_frequency)
void setTitle(QString *title)
virtual bool isSet() override
virtual QString asJson() override
SWGChannelReport * getReport()
virtual bool isSet() override