forked from lix-project/lix
eldritch horrors
b7e7949035
Improvements in src/libutil/config.*
(cherry picked from commit dea63bb81078d7290410544285c6df1a8e002952)
Change-Id: I8090eb2ad393dd9964cf2d5254ec8c796b1bd367
19 lines
414 B
C++
19 lines
414 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include <nlohmann/json.hpp>
|
|
#include "config.hh"
|
|
#include "json-utils.hh"
|
|
|
|
namespace nix {
|
|
template<typename T>
|
|
std::map<std::string, nlohmann::json> BaseSetting<T>::toJSONObject() const
|
|
{
|
|
auto obj = AbstractSetting::toJSONObject();
|
|
obj.emplace("value", value);
|
|
obj.emplace("defaultValue", defaultValue);
|
|
obj.emplace("documentDefault", documentDefault);
|
|
return obj;
|
|
}
|
|
}
|