| 116 | } |
| 117 | |
| 118 | std::optional<ImportData> Parser::parse_import_data(const std::filesystem::path& path) |
| 119 | { |
| 120 | LogFunc << VAR(path); |
| 121 | auto json_opt = json::open(path, true, true); |
| 122 | if (!json_opt) { |
| 123 | LogError << "failed to parse import interface" << VAR(path); |
| 124 | return std::nullopt; |
| 125 | } |
| 126 | |
| 127 | const json::value& json = *json_opt; |
| 128 | return parse_import_data(json); |
| 129 | } |
| 130 | |
| 131 | std::optional<ImportData> Parser::parse_import_data(const json::value& json) |
| 132 | { |