aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/abstract-setting-to-json.hh
blob: b3fbc84f76ac054ebcf0825b6c45e62e11d9ada7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
}
}