Load JSON string into this object
| 336 | |
| 337 | // Load JSON string into this object |
| 338 | void TrackedObjectBBox::SetJson(const std::string value) |
| 339 | { |
| 340 | // Parse JSON string into JSON objects |
| 341 | try |
| 342 | { |
| 343 | const Json::Value root = openshot::stringToJson(value); |
| 344 | // Set all values that match |
| 345 | SetJsonValue(root); |
| 346 | } |
| 347 | catch (const std::exception &e) |
| 348 | { |
| 349 | // Error parsing JSON (or missing keys) |
| 350 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 351 | } |
| 352 | return; |
| 353 | } |
| 354 | |
| 355 | // Load Json::Value into this object |
| 356 | void TrackedObjectBBox::SetJsonValue(const Json::Value root) |
nothing calls this directly
no test coverage detected