#ifndef JSONHANDLER_H
#define JSONHANDLER_H

#include <QtCore>

namespace ConfigHandler {
// 仪器系数
const QString ConInstrumentCoefficientStr  = "InstrumentCoefficient";
const float ConInstrumentCoefficientDefaultValue = 1.0;
const QString ConConfigFilePath = QDir::currentPath() + "/config.json";

const QMap<QString, QVariant> ConDefaultMap = {
    {ConInstrumentCoefficientStr, QVariant(1.000f)},
};

extern QMap<QString, QVariant> _configMap;

//
void reader();
//void createDefaultFile();

/**
 * @brief writer
 * @param writeRealDataFlag
 * true:Write _configMap content.
 * false:Write ConDefaultMap content.
 */
void writer(const bool writeRealDataFlag = true);
}


#endif // JSONHANDLER_H
