0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-30 17:34:04 +01:00

ircd::json: Fix empty value stringification cases; Fix serialized number printing.

This commit is contained in:
Jason Volk 2017-11-30 10:52:16 -08:00
parent 96499c0e2a
commit 219d1ba245

View file

@ -1035,7 +1035,8 @@ ircd::json::stringify(mutable_buffer &buf,
break;
}
consume(buf, copy(buf, v.literal_null));
//consume(buf, copy(buf, v.literal_null));
consume(buf, copy(buf, v.empty_object));
break;
}
@ -1053,7 +1054,8 @@ ircd::json::stringify(mutable_buffer &buf,
break;
}
consume(buf, copy(buf, v.literal_null));
//consume(buf, copy(buf, v.literal_null));
consume(buf, copy(buf, v.empty_array));
break;
}
@ -1061,11 +1063,7 @@ ircd::json::stringify(mutable_buffer &buf,
{
if(v.serial)
{
if(v.floats)
printer(buf, double_, string_view{v});
else
printer(buf, long_, string_view{v});
printer(buf, printer.number, string_view{v});
break;
}