Load JSON string into this object
| 3041 | |
| 3042 | // Load JSON string into this object |
| 3043 | void FFmpegReader::SetJson(const std::string value) { |
| 3044 | |
| 3045 | // Parse JSON string into JSON objects |
| 3046 | try { |
| 3047 | const Json::Value root = openshot::stringToJson(value); |
| 3048 | // Set all values that match |
| 3049 | SetJsonValue(root); |
| 3050 | } |
| 3051 | catch (const std::exception& e) { |
| 3052 | // Error parsing JSON (or missing keys) |
| 3053 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 3054 | } |
| 3055 | } |
| 3056 | |
| 3057 | // Load Json::Value into this object |
| 3058 | void FFmpegReader::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected