mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
Ref T237, JSON functions
* container file JSON function automatically detecting JSON format (swift, cache, DB) * utility functions
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user