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

Method SetJson

src/CVStabilization.cpp:339–353  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

337
338// Load JSON string into this object
339void CVStabilization::SetJson(const std::string value) {
340 // Parse JSON string into JSON objects
341 try
342 {
343 const Json::Value root = openshot::stringToJson(value);
344 // Set all values that match
345
346 SetJsonValue(root);
347 }
348 catch (const std::exception& e)
349 {
350 // Error parsing JSON (or missing keys)
351 throw openshot::InvalidJSON("JSON is invalid (missing keys or invalid data types)");
352 }
353}
354
355// Load Json::Value into this object
356void CVStabilization::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected