Refactored JsonParser to not use roles (or their names) directly.
This commit is contained in:
@ -8,6 +8,8 @@ class QString;
|
||||
class QByteArray;
|
||||
class QJsonArray;
|
||||
|
||||
using namespace std;
|
||||
|
||||
class JsonParser {
|
||||
public:
|
||||
static QList<QHash<int, QVariant>> toItemValuesList(const QByteArray& jsonData,
|
||||
@ -18,6 +20,8 @@ class JsonParser {
|
||||
|
||||
static QJsonArray extractItemArray(const QByteArray& jsonData, const QString& objectName);
|
||||
static QHash<int, QVariant> jsonObjectToItemValues(const QJsonObject& itemJsonObject);
|
||||
|
||||
static pair<int, QVariant> getKeyValuePair(const QJsonObject& itemJsonObject, const int role);
|
||||
};
|
||||
|
||||
#endif // JSONPARSER_H
|
||||
|
||||
Reference in New Issue
Block a user