mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::json: Pass all string input through the grammar.
This commit is contained in:
parent
9dd9875611
commit
ea1c0dcae7
1 changed files with 1 additions and 10 deletions
11
ircd/json.cc
11
ircd/json.cc
|
@ -2779,7 +2779,7 @@ ircd::json::stringify(mutable_buffer &buf,
|
|||
char *const start(begin(buf));
|
||||
assert(!surrounds(member.first, '"'));
|
||||
consume(buf, copy(buf, '"'));
|
||||
consume(buf, copy(buf, member.first));
|
||||
printer(buf, printer.name, member.first);
|
||||
consume(buf, copy(buf, "\":"_sv));
|
||||
stringify(buf, member.second);
|
||||
const string_view ret
|
||||
|
@ -3389,12 +3389,6 @@ ircd::json::stringify(mutable_buffer &buf,
|
|||
v.string, v.len
|
||||
};
|
||||
|
||||
if(v.serial)
|
||||
{
|
||||
consume(buf, copy(buf, sv));
|
||||
break;
|
||||
}
|
||||
|
||||
printer(buf, printer.string, sv);
|
||||
break;
|
||||
}
|
||||
|
@ -3532,9 +3526,6 @@ ircd::json::serialized(const value &v)
|
|||
if(!v.string)
|
||||
return size(empty_string);
|
||||
|
||||
if(v.serial)
|
||||
return v.len;
|
||||
|
||||
thread_local char test_buffer[value::max_string_size];
|
||||
const string_view sv{v.string, v.len};
|
||||
mutable_buffer buf{test_buffer};
|
||||
|
|
Loading…
Reference in a new issue