[#120] protogen: Marshal 64-bit integers as strings

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-10-01 13:50:43 +03:00
parent d94b9c6d0d
commit b06dad731c
10 changed files with 92 additions and 30 deletions

View file

@ -5612,7 +5612,9 @@ func (x *Range) MarshalEasyJSON(out *jwriter.Writer) {
}
const prefix string = "\"offset\":"
out.RawString(prefix)
out.Uint64(x.Offset)
out.RawByte('"')
out.Buffer.Buf = strconv.AppendUint(out.Buffer.Buf, x.Offset, 10)
out.RawByte('"')
}
}
{
@ -5624,7 +5626,9 @@ func (x *Range) MarshalEasyJSON(out *jwriter.Writer) {
}
const prefix string = "\"length\":"
out.RawString(prefix)
out.Uint64(x.Length)
out.RawByte('"')
out.Buffer.Buf = strconv.AppendUint(out.Buffer.Buf, x.Length, 10)
out.RawByte('"')
}
}
out.RawByte('}')