diff --git a/json.cpp.rl b/json.cpp.rl index b2881e04..650852cd 100644 --- a/json.cpp.rl +++ b/json.cpp.rl @@ -580,4 +580,16 @@ namespace json { io::serialise (const std::string &s) { return std::unique_ptr (new string (s)); } + + template <> + std::unique_ptr + io::serialise (const int &i) { + return std::unique_ptr (new number (i)); + } + + template <> + std::unique_ptr + io::serialise (const float &f) { + return std::unique_ptr (new number (f)); + } }