19using json = nlohmann::json;
54bool Get(
const json& j,
const std::string& name,
T& t)
56 auto iter = j.find(name);
68 catch (nlohmann::detail::exception& e)
71 log_err(
"json取值失败({}): {}", name, e.what());
void SetLog(bool open)
设置是否提示输出日志(请直接使用DisableLog来关闭后,自动恢复)
json Parse(std::string_view path_name)
从 文件 构建json对象
bool Get(const json &j, const std::string &name, T &t)
从json返回值,不存在则返回false,打印日志
std::string Dump(json &j)
dump
std::span< std::byte > BufferView