From 2efc09f2d042a60ca2befad38a7ed2b95d5101cd Mon Sep 17 00:00:00 2001 From: HanishKVC Date: Sun, 12 May 2024 00:41:15 +0530 Subject: [PATCH] ChatON: Unnecessarily indirect nlohmann json code used for exploring/testing commited just for future reference --- common/chaton.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/chaton.hpp b/common/chaton.hpp index 06646c372..dd8488906 100644 --- a/common/chaton.hpp +++ b/common/chaton.hpp @@ -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; }