diff --git a/src/libutil/json.cc b/src/libutil/json.cc index ecc3fdfe514e8f1bd2670a337f8642f80fd8d06f..6023d1d4fb84c20fd85d34802ab76de2b8d126b9 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 aec456845056a300990a65f6d788bc9ca5b40007..03eecb7325861bfc853d9574bd883f3b6e0f52a7 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);