Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
abstract-setting-to-json.hh
Go to the documentation of this file.
1#pragma once
3
4#include <nlohmann/json.hpp>
7
8namespace nix {
9template<typename T>
10std::map<std::string, nlohmann::json> BaseSetting<T>::toJSONObject() const
11{
12 auto obj = AbstractSetting::toJSONObject();
13 obj.emplace("value", value);
14 obj.emplace("defaultValue", defaultValue);
15 obj.emplace("documentDefault", documentDefault);
16 return obj;
17}
18} // namespace nix