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