19using json = nlohmann::json;
41bool Get(
const json& j,
const std::string& name,
T& t)
43 auto iter = j.find(name);
51 catch (nlohmann::detail::exception&)
63 auto iter = j.find(name);
74 catch (nlohmann::detail::exception& e)
76 log_err(
"json取值失败({}): {}", name, e.what());
bool GetLog(const json &j, const std::string &name, T &t)
从json返回值,不存在则返回false,打印日志
json Parse(std::string_view path_name)
从 文件 构建json对象
bool Get(const json &j, const std::string &name, T &t)
从json返回值,不存在则返回false,并且不进行任何操作
std::span< std::byte > BufferView