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:
parent
b1acf2cef1
commit
570f4d7f54
1 changed files with 6 additions and 0 deletions
|
@ -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};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue