| 93 | } |
| 94 | |
| 95 | void ModuleManifest::Parse(std::istream& is) |
| 96 | { |
| 97 | json root; |
| 98 | |
| 99 | try |
| 100 | { |
| 101 | root = json::parse(is); |
| 102 | } |
| 103 | catch (const json::exception& e) |
| 104 | { |
| 105 | throw std::runtime_error(e.what()); |
| 106 | } |
| 107 | |
| 108 | if (!root.is_object()) |
| 109 | { |
| 110 | throw std::runtime_error("The Json root element must be an object."); |
| 111 | } |
| 112 | |
| 113 | ParseJsonObject(root, m_Properties); |
| 114 | } |
| 115 | |
| 116 | bool ModuleManifest::Contains(const std::string& key) const |
| 117 | { |
no test coverage detected