Load JSON string into this object
| 354 | |
| 355 | // Load JSON string into this object |
| 356 | void QtImageReader::SetJson(const std::string value) { |
| 357 | |
| 358 | // Parse JSON string into JSON objects |
| 359 | try |
| 360 | { |
| 361 | const Json::Value root = openshot::stringToJson(value); |
| 362 | // Set all values that match |
| 363 | SetJsonValue(root); |
| 364 | } |
| 365 | catch (const std::exception& e) |
| 366 | { |
| 367 | // Error parsing JSON (or missing keys) |
| 368 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | // Load Json::Value into this object |
| 373 | void QtImageReader::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected