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