The AJSON class is responsible for parsing the database (sqlite) to and from JSON.  
 More...
#include <ajson.h>
|  | 
|  | AJson (QFileInfo database_file) | 
|  | 
|  | 
| static void | exportDatabase () | 
|  | exportDatabase exports the currently active database to JSON.  More... 
 | 
|  | 
| static void | importDatabase () | 
|  | importDatabase imports a dataset from JSON. Files need to be at AStanardPaths::JSON for now. 
 | 
|  | 
| static QJsonDocument | readFileToDoc (const QString &file_path) | 
|  | readToDocument reads data from a JSON file into a QJSonDocument  More... 
 | 
|  | 
| static void | writeDocToFile (const QJsonDocument &doc, const QString &file_name) | 
|  | writes a QJsonDocument to a file 
 | 
|  | 
The AJSON class is responsible for parsing the database (sqlite) to and from JSON. 
◆ exportDatabase()
  
  | 
        
          | void AJson::exportDatabase | ( |  | ) |  |  | static | 
 
exportDatabase exports the currently active database to JSON. 
QJsonObject can be constructed from QHash<QString, QVariant> aka QVariantmap. All rows are put into a QJsonArray and the Array is embedded into a QJsonDocument, which can be exported. The files are created at AStandardPaths::JSON. 
 
 
◆ readFileToDoc()
  
  | 
        
          | QJsonDocument AJson::readFileToDoc | ( | const QString & | file_path | ) |  |  | static | 
 
readToDocument reads data from a JSON file into a QJSonDocument 
- Parameters
- 
  
  
 
 
The documentation for this class was generated from the following files:
- src/classes/ajson.h
- src/classes/ajson.cpp