Closed zengzhengrong closed 4 years ago
Hi, it is not an error and in fact a Protobuf JSON mapping spec: https://developers.google.com/protocol-buffers/docs/proto3#json_mapping
It is done like that because JS integers are precise up to 2^52 instead of int64's 2^63: https://github.com/grpc-ecosystem/grpc-gateway/issues/219#issuecomment-251250029
So if you were sending JSON of {"foo":(number bigger than 2^52)}
many JSON parsers won't parse that number.
Yes, we've run into this limitation a couple of years ago also.
Thank ~! Got it
proto file
pb.go
It’s very strange ~, but I try to use int32 , it's work fine