Ref T237, JSON functions

* container file JSON function automatically detecting JSON format (swift, cache, DB)
* utility functions
This commit is contained in:
Klaus Basan
2018-01-30 06:30:39 +01:00
parent deddf7c957
commit 28b5ec9ec6
6 changed files with 55 additions and 5 deletions

View File

@@ -13,6 +13,7 @@
#define BLACKMISC_DB_DATABASEOBJECTLIST_H
#include "blackmisc/timestampobjectlist.h"
#include "blackmisc/jsonexception.h"
#include <QJsonArray>
#include <QSet>
#include <QString>
@@ -65,6 +66,10 @@ namespace BlackMisc
//! Number of entries with valid DB key
int countWithValidDbKey() const;
//! From multiple JSON formats
//! \remark supports native swift C++ format, DB format, and cache format
static CONTAINER fromMultipleJsonFormats(const QJsonObject &jsonObject);
//! From DB JSON with default prefixes
//! \remark Specialized classes might have their own fromDatabaseJson implementation
static CONTAINER fromDatabaseJson(const QJsonArray &array);