18 #include <QJsonDocument> 47 type =
new QString(
"");
49 name =
new QString(
"");
66 QByteArray array (json.toStdString().c_str());
67 QJsonDocument doc = QJsonDocument::fromJson(array);
68 QJsonObject jsonObject = doc.object();
88 QJsonDocument doc(*obj);
89 QByteArray bytes = doc.toJson();
91 return QString(bytes);
96 QJsonObject* obj =
new QJsonObject();
100 if(
type !=
nullptr && *
type != QString(
"")){
103 if(
name !=
nullptr && *
name != QString(
"")){
143 bool isObjectUpdated =
false;
146 if(
type !=
nullptr && *
type != QString(
"")){ isObjectUpdated =
true;
break;}
147 if(
name !=
nullptr && *
name != QString(
"")){ isObjectUpdated =
true;
break;}
149 return isObjectUpdated;
virtual SWGPresetItem * fromJson(QString &jsonString) override
qint64 getCenterFrequency()
void setCenterFrequency(qint64 center_frequency)
bool m_center_frequency_isSet
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setType(QString *type)
virtual QString asJson() override
virtual bool isSet() override
virtual void fromJsonObject(QJsonObject &json) override
virtual QJsonObject * asJsonObject() override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setName(QString *name)