| 89 | } |
| 90 | |
| 91 | std::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 | |
| 105 | std::optional<Configuration> Parser::parse_config(const json::value& json) |
| 106 | { |
nothing calls this directly
no test coverage detected