21 #include <QJsonDocument> 
   23 #include <QJsonObject> 
   57     static void writeDocToFile(
const QJsonDocument &doc, 
const QString& file_name);
 
   64     const static inline QList<OPL::DbTable> TABLES = {
 
   67         OPL::DbTable::Currencies,
 
   68         OPL::DbTable::Flights,
 
The JsonHelper class is responsible for parsing the database (sqlite) to and from JSON.
Definition: jsonhelper.h:29
static void writeDocToFile(const QJsonDocument &doc, const QString &file_name)
writes a QJsonDocument to a file
Definition: jsonhelper.cpp:66
static void importDatabase()
importDatabase imports a dataset from JSON. Files need to be at AStanardPaths::JSON for now.
Definition: jsonhelper.cpp:36
static void exportDatabase()
exportDatabase exports the currently active database to JSON.
Definition: jsonhelper.cpp:22
static QJsonDocument readFileToDoc(const QString &file_path)
readToDocument reads data from a JSON file into a QJSonDocument
Definition: jsonhelper.cpp:55