diff --git a/include/glaze/json/write.hpp b/include/glaze/json/write.hpp index 049741465c..58bfac83aa 100644 --- a/include/glaze/json/write.hpp +++ b/include/glaze/json/write.hpp @@ -826,6 +826,9 @@ namespace glz if constexpr (str_t || char_t || glaze_enum_t || Opts.quoted_num) { to>::template op(key, ctx, b, ix); } + else if constexpr (num_t) { + write::op>(key, ctx, b, ix); + } else { write::op>(quoted_t{key}, ctx, b, ix); }