Load JSON string into this object
| 357 | |
| 358 | // Load JSON string into this object |
| 359 | void CVObjectDetection::SetJson(const std::string value) { |
| 360 | // Parse JSON string into JSON objects |
| 361 | try |
| 362 | { |
| 363 | const Json::Value root = openshot::stringToJson(value); |
| 364 | // Set all values that match |
| 365 | |
| 366 | SetJsonValue(root); |
| 367 | } |
| 368 | catch (const std::exception& e) |
| 369 | { |
| 370 | // Error parsing JSON (or missing keys) |
| 371 | // throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 372 | std::cout<<"JSON is invalid (missing keys or invalid data types)"<<std::endl; |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | // Load Json::Value into this object |
| 377 | void CVObjectDetection::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no outgoing calls
no test coverage detected