about summary refs log tree commit diff
path: root/src/libutil/json.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/json.hh')
-rw-r--r--src/libutil/json.hh11
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
 {