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

Method SetJson

src/effects/Blur.cpp:219–233  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

217
218// Load JSON string into this object
219void Blur::SetJson(const std::string value) {
220
221 // Parse JSON string into JSON objects
222 try
223 {
224 const Json::Value root = openshot::stringToJson(value);
225 // Set all values that match
226 SetJsonValue(root);
227 }
228 catch (const std::exception& e)
229 {
230 // Error parsing JSON (or missing keys)
231 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
232 }
233}
234
235// Load Json::Value into this object
236void Blur::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected