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
What version of protobuf and what language are you using? Version: master/v3.6.0/v3.5.0 etc. master
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript Python
What operating system (Linux, Windows, ...) and version? doesn't matter
What runtime / compiler are you using (e.g., python version or gcc version) doesn't matter
What did you do? See https://github.com/protocolbuffers/protobuf/blob/master/python/google/protobuf/json_format.py#L68
What did you expect to see fixed64 and sfixed64 types are also converted to json numbers when we run json_format.
What did you see instead? They are converted to strings.
The text was updated successfully, but these errors were encountered:
It is by design. for int64, fixed64 and uint64, protobuf JSON printer will print a string. Both numbers and strings are accepted in parser: https://developers.google.com/protocol-buffers/docs/proto3#json
Sorry, something went wrong.
Hi Jie, do you mind elaborating a bit on why this design choice was made?
anandolee
No branches or pull requests
What version of protobuf and what language are you using?
Version: master/v3.6.0/v3.5.0 etc.
master
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
Python
What operating system (Linux, Windows, ...) and version?
doesn't matter
What runtime / compiler are you using (e.g., python version or gcc version)
doesn't matter
What did you do?
See https://github.com/protocolbuffers/protobuf/blob/master/python/google/protobuf/json_format.py#L68
What did you expect to see
fixed64 and sfixed64 types are also converted to json numbers when we run json_format.
What did you see instead?
They are converted to strings.
The text was updated successfully, but these errors were encountered: