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