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

Method SetJson

src/effects/Pixelate.cpp:156–170  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

154
155// Load JSON string into this object
156void Pixelate::SetJson(const std::string value) {
157
158 // Parse JSON string into JSON objects
159 try
160 {
161 const Json::Value root = openshot::stringToJson(value);
162 // Set all values that match
163 SetJsonValue(root);
164 }
165 catch (const std::exception& e)
166 {
167 // Error parsing JSON (or missing keys)
168 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
169 }
170}
171
172// Load Json::Value into this object
173void Pixelate::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected