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

Method SetJson

src/effects/Brightness.cpp:207–221  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

205
206// Load JSON string into this object
207void Brightness::SetJson(const std::string value) {
208
209 // Parse JSON string into JSON objects
210 try
211 {
212 const Json::Value root = openshot::stringToJson(value);
213 // Set all values that match
214 SetJsonValue(root);
215 }
216 catch (const std::exception& e)
217 {
218 // Error parsing JSON (or missing keys)
219 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
220 }
221}
222
223// Load Json::Value into this object
224void Brightness::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected