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

Method SetJson

src/audio_effects/ParametricEQ.cpp:196–210  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

194
195// Load JSON string into this object
196void ParametricEQ::SetJson(const std::string value) {
197
198 // Parse JSON string into JSON objects
199 try
200 {
201 const Json::Value root = openshot::stringToJson(value);
202 // Set all values that match
203 SetJsonValue(root);
204 }
205 catch (const std::exception& e)
206 {
207 // Error parsing JSON (or missing keys)
208 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
209 }
210}
211
212// Load Json::Value into this object
213void ParametricEQ::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected