21#include "nlohmann/json.hpp"
41 bool load(
const std::string &path);
48 bool save(
const std::string &path)
const;
53 nlohmann::json &
data();
58 const nlohmann::json &
data()
const;
63 nlohmann::json &
root();
68 const nlohmann::json &
root()
const;
96 nlohmann::json
mergeDefaults(
const nlohmann::json &target,
const nlohmann::json &defaults);
nlohmann::json mergeDefaults(const nlohmann::json &target, const nlohmann::json &defaults)
Merge a default JSON structure into a target, preserving existing keys.
Abstract interface for file and directory storage backends.
Manages loading and saving of a single JSON document using StorageManager.
nlohmann::json & operator*()
Operator alias for data().
nlohmann::json & data()
Access the internal JSON object.
bool hasValidData() const
nlohmann::json & root()
Alias for data().
bool save(const std::string &path) const
Save the current JSON data to storage.
bool load(const std::string &path)
Load a JSON file from storage.
Abstract base class for storage access and file operations.