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

Method SetJson

src/audio_effects/Expander.cpp:146–160  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

144
145// Load JSON string into this object
146void Expander::SetJson(const std::string value) {
147
148 // Parse JSON string into JSON objects
149 try
150 {
151 const Json::Value root = openshot::stringToJson(value);
152 // Set all values that match
153 SetJsonValue(root);
154 }
155 catch (const std::exception& e)
156 {
157 // Error parsing JSON (or missing keys)
158 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
159 }
160}
161
162// Load Json::Value into this object
163void Expander::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected