1
0
Fork 0
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:
Eelco Dolstra 2020-09-21 18:49:43 +02:00
parent 340ca382c4
commit 0716adaa8b
3 changed files with 2 additions and 2 deletions

View 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;
}
}