5#include <nlohmann/json.hpp>
38 const nlohmann::json &jsonData,
39 int indent = 2)
const = 0;
59 int indent = 2)
const = 0;
Interface for JSON serialization and parsing.
Definition IJsonSerializer.hpp:14
virtual Result< nlohmann::json, JsonError > loadFromFile(const std::filesystem::path &filePath) const =0
Load JSON from file.
virtual ~IJsonSerializer()=default
virtual Result< nlohmann::json, JsonError > parse(const std::string &jsonString) const =0
Parse JSON from string.
virtual Result< void, JsonError > saveToFile(const std::filesystem::path &filePath, const nlohmann::json &jsonData, int indent=2) const =0
Save JSON to file.
virtual Result< std::string, JsonError > toString(const nlohmann::json &jsonData, int indent=2) const =0
Convert JSON to string.
Definition UtilsError.hpp:93
Definition DirectoryManager.cpp:5