#pragma once #include "PublicFunc.h" #include using namespace std; class JsonConfig { public: JsonConfig(void); ~JsonConfig(void); public: void WriteToJson(PCONFIGPARAMS pConfigItem,const std::string fileName,bool isConfigItem=true); //PCONFIGPARAMS ReadJsonFromFile(const char* fileNames); void WriteJsonData(const std::string fileName); void WriteJsonArrayToFile(std::vector cfgArray,const std::string filename); CONFIGPARAMS ReadDefaultConfig(); bool DeleteJsonFile(std::string path); std::vector ReadJsonArrayFromFile(const std::string filename); CONFIGPARAMS GetDefaultConfigParams(); private: std::vector parseJsonFromString(const std::string str) ; };