ChatON: Unnecessarily indirect nlohmann json

code used for exploring/testing commited just for future reference
This commit is contained in:
HanishKVC 2024-05-12 00:41:15 +05:30
parent b9d9700de3
commit 2efc09f2d0

View file

@ -314,8 +314,14 @@ ChatTemplates gCT = {{}};
inline bool chaton_meta_load(const std::string &fname) {
std::ifstream f(fname);
json conMeta = json::parse(f);
for(auto it=conMeta.begin(); it != conMeta.end(); ++it) {
std::cout << it.key() << std::endl;
std::cout << it.value() << std::endl;
auto curMeta = conMeta[it.key()];
std::cout << curMeta.dump(4) << std::endl;
}
for(auto curTmpl: conMeta) {
curTmpl.dump();
std::cout << curTmpl.dump(4) << std::endl;
}
return true;
}