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

Method SetJson

src/audio_effects/Whisperization.cpp:114–128  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected