Load JSON string into this object
| 137 | |
| 138 | // Load JSON string into this object |
| 139 | void Outline::SetJson(const std::string value) { |
| 140 | |
| 141 | // Parse JSON string into JSON objects |
| 142 | try |
| 143 | { |
| 144 | const Json::Value root = openshot::stringToJson(value); |
| 145 | // Set all values that match |
| 146 | SetJsonValue(root); |
| 147 | } |
| 148 | catch (const std::exception& e) |
| 149 | { |
| 150 | // Error parsing JSON (or missing keys) |
| 151 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | // Load Json::Value into this object |
| 156 | void Outline::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected