18 #include <QJsonDocument> 49 rssi =
new QString(
"");
69 QByteArray array (json.toStdString().c_str());
70 QJsonDocument doc = QJsonDocument::fromJson(array);
71 QJsonObject jsonObject = doc.object();
93 QJsonDocument doc(*obj);
94 QByteArray bytes = doc.toJson();
96 return QString(bytes);
101 QJsonObject* obj =
new QJsonObject();
103 obj->insert(
"adcRate", QJsonValue(
adc_rate));
105 if(
rssi !=
nullptr && *
rssi != QString(
"")){
109 obj->insert(
"gainDB", QJsonValue(
gain_db));
112 obj->insert(
"temperature", QJsonValue(
temperature));
161 bool isObjectUpdated =
false;
164 if(
rssi !=
nullptr && *
rssi != QString(
"")){ isObjectUpdated =
true;
break;}
168 return isObjectUpdated;
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)