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

Method SetJson

src/effects/Saturation.cpp:258–272  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

256
257// Load JSON string into this object
258void Saturation::SetJson(const std::string value) {
259
260 // Parse JSON string into JSON objects
261 try
262 {
263 const Json::Value root = openshot::stringToJson(value);
264 // Set all values that match
265 SetJsonValue(root);
266 }
267 catch (const std::exception& e)
268 {
269 // Error parsing JSON (or missing keys)
270 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
271 }
272}
273
274// Load Json::Value into this object
275void Saturation::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected