0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd::json: stringify empty array as expected by serialized size.

This commit is contained in:
Jason Volk 2017-11-01 15:55:28 -07:00
parent b1acf2cef1
commit 570f4d7f54

View file

@ -707,6 +707,12 @@ ircd::string_view
ircd::json::stringify(mutable_buffer &buf,
const array &v)
{
if(string_view{v}.empty())
{
consume(buf, copy(buf, value::empty_array));
return value::empty_array;
}
consume(buf, copy(buf, string_view{v}));
return string_view{v};
}