Load JSON string into this object
| 60 | |
| 61 | // Load JSON string into this object |
| 62 | void Negate::SetJson(const std::string value) { |
| 63 | |
| 64 | // Parse JSON string into JSON objects |
| 65 | try |
| 66 | { |
| 67 | const Json::Value root = openshot::stringToJson(value); |
| 68 | // Set all values that match |
| 69 | SetJsonValue(root); |
| 70 | } |
| 71 | catch (const std::exception& e) |
| 72 | { |
| 73 | // Error parsing JSON (or missing keys) |
| 74 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | // Load Json::Value into this object |
| 79 | void Negate::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected