mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
ircd::json: Fix empty value stringification cases; Fix serialized number printing.
This commit is contained in:
parent
96499c0e2a
commit
219d1ba245
1 changed files with 5 additions and 7 deletions
12
ircd/json.cc
12
ircd/json.cc
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue