18 #include <QJsonDocument> 73 QByteArray array (json.toStdString().c_str());
74 QJsonDocument doc = QJsonDocument::fromJson(array);
75 QJsonObject jsonObject = doc.object();
97 QJsonDocument doc(*obj);
98 QByteArray bytes = doc.toJson();
100 return QString(bytes);
105 QJsonObject* obj =
new QJsonObject();
165 bool isObjectUpdated =
false;
167 if(
device_id !=
nullptr && *
device_id != QString(
"")){ isObjectUpdated =
true;
break;}
170 if(
config !=
nullptr &&
config->isSet()){ isObjectUpdated =
true;
break;}
172 return isObjectUpdated;
void setDeviceSequence(qint32 device_sequence)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
virtual QString asJson() override
void setConfig(SWGDeviceSettings *config)
void setDeviceId(QString *device_id)
virtual void fromJsonObject(QJsonObject &json) override
void setDeviceSerial(QString *device_serial)
bool m_device_sequence_isSet
SWGDeviceSettings * config
virtual ~SWGDeviceConfig()
bool m_device_serial_isSet
QString * getDeviceSerial()
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
virtual bool isSet() override
virtual QJsonObject * asJsonObject() override
SWGDeviceSettings * getConfig()
virtual SWGDeviceConfig * fromJson(QString &jsonString) override
qint32 getDeviceSequence()