Load JSON string into this object
| 200 | |
| 201 | // Load JSON string into this object |
| 202 | void QtHtmlReader::SetJson(const std::string value) { |
| 203 | |
| 204 | // Parse JSON string into JSON objects |
| 205 | try |
| 206 | { |
| 207 | const Json::Value root = openshot::stringToJson(value); |
| 208 | // Set all values that match |
| 209 | SetJsonValue(root); |
| 210 | } |
| 211 | catch (const std::exception& e) |
| 212 | { |
| 213 | // Error parsing JSON (or missing keys) |
| 214 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | // Load Json::Value into this object |
| 219 | void QtHtmlReader::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected