mirror of
https://github.com/NixOS/nix
synced 2025-06-28 13:41:15 +02:00
abstractsettingtojson.hh -> abstract-setting-to-json.hh
This commit is contained in:
parent
340ca382c4
commit
0716adaa8b
3 changed files with 2 additions and 2 deletions
15
src/libutil/abstract-setting-to-json.hh
Normal file
15
src/libutil/abstract-setting-to-json.hh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "config.hh"
|
||||
|
||||
namespace nix {
|
||||
template<typename T>
|
||||
std::map<std::string, nlohmann::json> BaseSetting<T>::toJSONObject()
|
||||
{
|
||||
auto obj = AbstractSetting::toJSONObject();
|
||||
obj.emplace("value", value);
|
||||
obj.emplace("defaultValue", defaultValue);
|
||||
return obj;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue