about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/json.cc10
-rw-r--r--src/libutil/json.hh2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/libutil/json.cc b/src/libutil/json.cc
index ecc3fdfe514e..6023d1d4fb84 100644
--- a/src/libutil/json.cc
+++ b/src/libutil/json.cc
@@ -44,6 +44,16 @@ void toJSON(std::ostream & str, long n)
     str << n;
 }
 
+void toJSON(std::ostream & str, unsigned int n)
+{
+    str << n;
+}
+
+void toJSON(std::ostream & str, int n)
+{
+    str << n;
+}
+
 void toJSON(std::ostream & str, double f)
 {
     str << f;
diff --git a/src/libutil/json.hh b/src/libutil/json.hh
index aec456845056..03eecb732586 100644
--- a/src/libutil/json.hh
+++ b/src/libutil/json.hh
@@ -12,6 +12,8 @@ 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);