Protobuf: don't wrap uint64/sint64 numbers in quote

Technically this is to support JavaScript as it supports up to 53 bits precision, but we want to stick to the same scheme RapidJSON is using.
This commit is contained in:
Kawe Mazidjatari 2024-04-03 01:57:38 +02:00
parent a26e51ae00
commit d853846189

View File

@ -99,18 +99,18 @@ JsonObjectWriter* JsonObjectWriter::RenderUint32(StringPiece name,
JsonObjectWriter* JsonObjectWriter::RenderInt64(StringPiece name, JsonObjectWriter* JsonObjectWriter::RenderInt64(StringPiece name,
int64_t value) { int64_t value) {
WritePrefix(name); WritePrefix(name);
WriteChar('"'); //WriteChar('"');
WriteRawString(StrCat(value)); WriteRawString(StrCat(value));
WriteChar('"'); //WriteChar('"');
return this; return this;
} }
JsonObjectWriter* JsonObjectWriter::RenderUint64(StringPiece name, JsonObjectWriter* JsonObjectWriter::RenderUint64(StringPiece name,
uint64_t value) { uint64_t value) {
WritePrefix(name); WritePrefix(name);
WriteChar('"'); //WriteChar('"');
WriteRawString(StrCat(value)); WriteRawString(StrCat(value));
WriteChar('"'); //WriteChar('"');
return this; return this;
} }