MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / SetJson

Method SetJson

src/effects/Hue.cpp:154–168  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

152
153// Load JSON string into this object
154void Hue::SetJson(const std::string value) {
155
156 // Parse JSON string into JSON objects
157 try
158 {
159 const Json::Value root = openshot::stringToJson(value);
160 // Set all values that match
161 SetJsonValue(root);
162 }
163 catch (const std::exception& e)
164 {
165 // Error parsing JSON (or missing keys)
166 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
167 }
168}
169
170// Load Json::Value into this object
171void Hue::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected