Nix 2.26.3
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>
5#include "config.hh"
6#include "json-utils.hh"
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}
const T & value
Definition lexer.l:492