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

Method SetJson

src/effects/Outline.cpp:139–153  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

137
138// Load JSON string into this object
139void Outline::SetJson(const std::string value) {
140
141 // Parse JSON string into JSON objects
142 try
143 {
144 const Json::Value root = openshot::stringToJson(value);
145 // Set all values that match
146 SetJsonValue(root);
147 }
148 catch (const std::exception& e)
149 {
150 // Error parsing JSON (or missing keys)
151 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
152 }
153}
154
155// Load Json::Value into this object
156void Outline::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected