| 145 | } |
| 146 | |
| 147 | void WarnUnknownKeys(const json &obj, const std::set<std::string> &known, const std::string &context) |
| 148 | { |
| 149 | if (!obj.is_object()) |
| 150 | return; |
| 151 | for (auto it = obj.begin(); it != obj.end(); ++it) |
| 152 | { |
| 153 | if (known.find(it.key()) == known.end()) |
| 154 | { |
| 155 | MITK_WARN << "Unknown key '" << it.key() << "' in " << context << " - ignoring."; |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | enum class LoadStyle |
| 161 | { |