Load JSON string into this object
| 85 | |
| 86 | // Load JSON string into this object |
| 87 | void Point::SetJson(const std::string value) { |
| 88 | |
| 89 | // Parse JSON string into JSON objects |
| 90 | try |
| 91 | { |
| 92 | const Json::Value root = openshot::stringToJson(value); |
| 93 | // Set all values that match |
| 94 | SetJsonValue(root); |
| 95 | } |
| 96 | catch (const std::exception& e) |
| 97 | { |
| 98 | // Error parsing JSON (or missing keys) |
| 99 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | // Load Json::Value into this object |
| 104 | void Point::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected