MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / parse_config

Method parse_config

source/MaaPiCli/Impl/Parser.cpp:91–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91std::optional<Configuration> Parser::parse_config(const std::filesystem::path& path)
92{
93 LogFunc << VAR(path);
94
95 auto json_opt = json::open(path, true, true);
96 if (!json_opt) {
97 LogWarn << "failed to parse" << path;
98 return std::nullopt;
99 }
100
101 const json::value& json = *json_opt;
102 return parse_config(json);
103}
104
105std::optional<Configuration> Parser::parse_config(const json::value& json)
106{

Callers

nothing calls this directly

Calls 2

parse_configFunction · 0.85
ConfigurationClass · 0.85

Tested by

no test coverage detected