diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-04-20T15·34+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-04-20T15·34+0200 |
commit | efa4bdbfcd1489527bcf6f20a49c9a3bca8bbf6b (patch) | |
tree | 0e965a2b8feb129623c221564e7ca208ce16fe2a /src/libutil/json.hh | |
parent | 4410e9d995bcd53a7a4cff0bbee3917375adcba3 (diff) |
Improve nix show-config --json
In particular, show descriptions. This could be used for manpage generation etc.
Diffstat (limited to 'src/libutil/json.hh')
-rw-r--r-- | src/libutil/json.hh | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/libutil/json.hh b/src/libutil/json.hh index 03eecb732586..595e9bbe3491 100644 --- a/src/libutil/json.hh +++ b/src/libutil/json.hh @@ -7,15 +7,10 @@ namespace nix { void toJSON(std::ostream & str, const char * start, const char * end); -void toJSON(std::ostream & str, const std::string & s); void toJSON(std::ostream & str, const char * s); -void toJSON(std::ostream & str, unsigned long long n); -void toJSON(std::ostream & str, unsigned long n); -void toJSON(std::ostream & str, long n); -void toJSON(std::ostream & str, unsigned int n); -void toJSON(std::ostream & str, int n); -void toJSON(std::ostream & str, double f); -void toJSON(std::ostream & str, bool b); + +template<typename T> +void toJSON(std::ostream & str, const T & n); class JSONWriter { |