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

Method SetJson

src/effects/Stabilizer.cpp:177–191  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

175
176// Load JSON string into this object
177void Stabilizer::SetJson(const std::string value) {
178 // Parse JSON string into JSON objects
179 try
180 {
181 const Json::Value root = openshot::stringToJson(value);
182 // Set all values that match
183
184 SetJsonValue(root);
185 }
186 catch (const std::exception& e)
187 {
188 // Error parsing JSON (or missing keys)
189 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
190 }
191}
192
193// Load Json::Value into this object
194void Stabilizer::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected