18 #include <QJsonDocument> 43 name =
new QString(
"");
59 QByteArray array (json.toStdString().c_str());
60 QJsonDocument doc = QJsonDocument::fromJson(array);
61 QJsonObject jsonObject = doc.object();
79 QJsonDocument doc(*obj);
80 QByteArray bytes = doc.toJson();
82 return QString(bytes);
87 QJsonObject* obj =
new QJsonObject();
88 if(
name !=
nullptr && *
name != QString(
"")){
92 obj->insert(
"value", QJsonValue(
value));
121 bool isObjectUpdated =
false;
123 if(
name !=
nullptr && *
name != QString(
"")){ isObjectUpdated =
true;
break;}
126 return isObjectUpdated;
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setName(QString *name)
virtual SWGNamedEnum * fromJson(QString &jsonString) override
void setValue(qint32 value)
virtual QJsonObject * asJsonObject() override
virtual QString asJson() override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
virtual bool isSet() override
virtual void fromJsonObject(QJsonObject &json) override