-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysisjson.h
More file actions
22 lines (21 loc) · 773 Bytes
/
analysisjson.h
File metadata and controls
22 lines (21 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef ANALYSISJSON_H
#define ANALYSISJSON_H
#include "ruletemplate.h"
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include <QFile>
class AnalysisJson
{
public:
AnalysisJson();
static QJsonObject errToJson(const Err& err);
static QJsonObject ruleToJson(const Rule& rule);
static QJsonObject ruleTemplateToJson(const RuleTemplate& ruleTemplate);
static void saveRuleTemplateToJson(const RuleTemplate& ruleTemplate, const QString& filePath);
static Err jsonToErr(const QJsonObject& jsonObj);
static Rule jsonToRule(const QJsonObject& jsonObj);
static RuleTemplate jsonToRuleTemplate(const QJsonObject& jsonObj);
static RuleTemplate loadRuleTemplateFromJson(const QString& filePath);
};
#endif // ANALYSISJSON_H