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

Method SetJson

src/effects/Wave.cpp:119–133  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected