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

Method JsonValue

src/CacheMemory.cpp:278–297  ·  view source on GitHub ↗

Generate Json::Value for this object

Source from the content-addressed store, hash-verified

276
277// Generate Json::Value for this object
278Json::Value CacheMemory::JsonValue() {
279
280 // Process range data (if anything has changed)
281 CalculateRanges();
282
283 // Create root json object
284 Json::Value root = CacheBase::JsonValue(); // get parent properties
285 root["type"] = cache_type;
286
287 root["version"] = std::to_string(range_version);
288
289 // Parse and append range data (if any)
290 try {
291 const Json::Value ranges = openshot::stringToJson(json_ranges);
292 root["ranges"] = ranges;
293 } catch (...) { }
294
295 // return JsonValue
296 return root;
297}
298
299// Load JSON string into this object
300void CacheMemory::SetJson(const std::string value) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected