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

Method SetJson

src/audio_effects/Echo.cpp:129–143  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

127
128// Load JSON string into this object
129void Echo::SetJson(const std::string value) {
130
131 // Parse JSON string into JSON objects
132 try
133 {
134 const Json::Value root = openshot::stringToJson(value);
135 // Set all values that match
136 SetJsonValue(root);
137 }
138 catch (const std::exception& e)
139 {
140 // Error parsing JSON (or missing keys)
141 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
142 }
143}
144
145// Load Json::Value into this object
146void Echo::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected