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

Method SetJson

src/effects/Deinterlace.cpp:118–132  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

116
117// Load JSON string into this object
118void Deinterlace::SetJson(const std::string value) {
119
120 // Parse JSON string into JSON objects
121 try
122 {
123 const Json::Value root = openshot::stringToJson(value);
124 // Set all values that match
125 SetJsonValue(root);
126 }
127 catch (const std::exception& e)
128 {
129 // Error parsing JSON (or missing keys)
130 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
131 }
132}
133
134// Load Json::Value into this object
135void Deinterlace::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected