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