mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-09-02 16:00:36 +00:00
major: initial release
* initial development * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * pokemon * pokemon * pokemon * pokemon * pokemon * pokemon * improvements * improvements * ci/cd * ci/cd * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements --------- Co-authored-by: sdine <sdine@sdine.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include "ccm/domain/Configuration.hpp"
|
||||
|
||||
namespace ccm {
|
||||
|
||||
void to_json(nlohmann::json& j, const Configuration& c) {
|
||||
j = nlohmann::json{
|
||||
{"dataStorage", c.dataStorage},
|
||||
{"defaultGame", c.defaultGame},
|
||||
{"theme", c.theme},
|
||||
};
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Configuration& c) {
|
||||
j.at("dataStorage").get_to(c.dataStorage);
|
||||
j.at("defaultGame").get_to(c.defaultGame);
|
||||
c.theme = j.value("theme", Theme::Light);
|
||||
}
|
||||
|
||||
} // namespace ccm
|
||||
Reference in New Issue
Block a user