We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proto file
message Userprofile{ int64 user_id = 1; ... }
pb.go
type Userprofile struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` .... }
It’s very strange ~, but I try to use int32 , it's work fine
The text was updated successfully, but these errors were encountered:
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: grpc-ecosystem/grpc-gateway#219 (comment)
So if you were sending JSON of {"foo":(number bigger than 2^52)} many JSON parsers won't parse that number.
{"foo":(number bigger than 2^52)}
Sorry, something went wrong.
Yes, we've run into this limitation a couple of years ago also.
Thank ~! Got it
No branches or pull requests
proto file
pb.go
It’s very strange ~, but I try to use int32 , it's work fine
The text was updated successfully, but these errors were encountered: