Load JSON string into this object
| 165 | |
| 166 | // Load JSON string into this object |
| 167 | void DummyReader::SetJson(const std::string value) { |
| 168 | |
| 169 | // Parse JSON string into JSON objects |
| 170 | try |
| 171 | { |
| 172 | const Json::Value root = openshot::stringToJson(value); |
| 173 | // Set all values that match |
| 174 | SetJsonValue(root); |
| 175 | } |
| 176 | catch (const std::exception& e) |
| 177 | { |
| 178 | // Error parsing JSON (or missing keys) |
| 179 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | // Load Json::Value into this object |
| 184 | void DummyReader::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected