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

Method SetJson

src/FFmpegReader.cpp:3043–3055  ·  view source on GitHub ↗

Load JSON string into this object

Source from the content-addressed store, hash-verified

3041
3042// Load JSON string into this object
3043void FFmpegReader::SetJson(const std::string value) {
3044
3045 // Parse JSON string into JSON objects
3046 try {
3047 const Json::Value root = openshot::stringToJson(value);
3048 // Set all values that match
3049 SetJsonValue(root);
3050 }
3051 catch (const std::exception& e) {
3052 // Error parsing JSON (or missing keys)
3053 throw InvalidJSON("JSON is invalid (missing keys or invalid data types)");
3054 }
3055}
3056
3057// Load Json::Value into this object
3058void FFmpegReader::SetJsonValue(const Json::Value root) {

Callers

nothing calls this directly

Calls 1

InvalidJSONClass · 0.85

Tested by

no test coverage detected