Load JSON string into this object
| 104 | |
| 105 | // Load JSON string into this object |
| 106 | void Robotization::SetJson(const std::string value) { |
| 107 | |
| 108 | // Parse JSON string into JSON objects |
| 109 | try |
| 110 | { |
| 111 | const Json::Value root = openshot::stringToJson(value); |
| 112 | // Set all values that match |
| 113 | SetJsonValue(root); |
| 114 | } |
| 115 | catch (const std::exception& e) |
| 116 | { |
| 117 | // Error parsing JSON (or missing keys) |
| 118 | throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | // Load Json::Value into this object |
| 123 | void Robotization::SetJsonValue(const Json::Value root) { |
nothing calls this directly
no test coverage detected