Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

SDK_API::readStorageJson

Reads JSON below a storage root.

Declaration

virtual nlohmann::json readStorageJson(const std::string& scope, const std::string& path,
            const nlohmann::json& missing = nullptr, const std::string& project = "") {
            throw std::runtime_error("JSON storage helpers are unavailable in this host.");
        }

Parameters

NameDescription
scopeNamed storage root.
pathRelative JSON filename.
missingValue returned when the file does not exist.
projectProject name; empty selects the active project.

Returns

Parsed JSON; corrupt and unreadable files throw.