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

Method SetJson

src/effects/Negate.cpp:62–76  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

60
61// Load JSON string into this object
62void Negate::SetJson(const std::string value) {
63
64 // Parse JSON string into JSON objects
65 try
66 {
67 const Json::Value root = openshot::stringToJson(value);
68 // Set all values that match
69 SetJsonValue(root);
70 }
71 catch (const std::exception& e)
72 {
73 // Error parsing JSON (or missing keys)
74 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
75 }
76}
77
78// Load Json::Value into this object
79void Negate::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected