2020-09-16 10:06:35 +03:00
|
|
|
#pragma once
|
2023-04-01 06:18:41 +03:00
|
|
|
///@file
|
2020-09-16 10:06:35 +03:00
|
|
|
|
|
|
|
#include <nlohmann/json.hpp>
|
|
|
|
#include "config.hh"
|
2023-05-19 17:56:59 +03:00
|
|
|
#include "json-utils.hh"
|
2020-09-16 10:06:35 +03:00
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
template<typename T>
|
2023-11-05 17:12:20 +02:00
|
|
|
std::map<std::string, nlohmann::json> BaseSetting<T>::toJSONObject() const
|
2020-09-16 10:06:35 +03:00
|
|
|
{
|
|
|
|
auto obj = AbstractSetting::toJSONObject();
|
|
|
|
obj.emplace("value", value);
|
|
|
|
obj.emplace("defaultValue", defaultValue);
|
2021-12-01 17:08:23 +02:00
|
|
|
obj.emplace("documentDefault", documentDefault);
|
2020-09-16 10:06:35 +03:00
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
}
|