18 #include <QJsonDocument> 51 name =
new QString(
"");
85 QByteArray array (json.toStdString().c_str());
86 QJsonDocument doc = QJsonDocument::fromJson(array);
87 QJsonObject jsonObject = doc.object();
113 QJsonDocument doc(*obj);
114 QByteArray bytes = doc.toJson();
116 return QString(bytes);
121 QJsonObject* obj =
new QJsonObject();
122 if(
name !=
nullptr && *
name != QString(
"")){
128 if(
id !=
nullptr && *
id != QString(
"")){
129 toJsonValue(QString(
"id"),
id, obj, QString(
"QString"));
132 obj->insert(
"direction", QJsonValue(
direction));
138 obj->insert(
"index", QJsonValue(
index));
207 bool isObjectUpdated =
false;
209 if(
name !=
nullptr && *
name != QString(
"")){ isObjectUpdated =
true;
break;}
210 if(
id_uri !=
nullptr && *
id_uri != QString(
"")){ isObjectUpdated =
true;
break;}
211 if(
id !=
nullptr && *
id != QString(
"")){ isObjectUpdated =
true;
break;}
213 if(
version !=
nullptr && *
version != QString(
"")){ isObjectUpdated =
true;
break;}
216 return isObjectUpdated;
void setVersion(QString *version)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
virtual void fromJsonObject(QJsonObject &json) override
virtual QString asJson() override
virtual SWGChannelListItem * fromJson(QString &jsonString) override
virtual QJsonObject * asJsonObject() override
virtual ~SWGChannelListItem()
void setIndex(qint32 index)
virtual bool isSet() override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setName(QString *name)
void setDirection(qint32 direction)
void setIdUri(QString *id_uri)