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

Method SetJson

src/Clip.cpp:995–1009  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

993
994// Load JSON string into this object
995void Clip::SetJson(const std::string value) {
996
997 // Parse JSON string into JSON objects
998 try
999 {
1000 const Json::Value root = openshot::stringToJson(value);
1001 // Set all values that match
1002 SetJsonValue(root);
1003 }
1004 catch (const std::exception& e)
1005 {
1006 // Error parsing JSON (or missing keys)
1007 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
1008 }
1009}
1010
1011// Load Json::Value into this object
1012void Clip::SetJsonValue(const Json::Value root) {

Callers 2

SetTimelineSourceMethod · 0.45
mainFunction · 0.45

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected