You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: 3.9.1
Language: Ruby
What operating system (Linux, Windows, ...) and version?
OS X
What runtime / compiler are you using (e.g., python version or gcc version)
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin18]
What did you do?
Decode a JSON encoded message with an Int64Value or an UInt64Value field. The canonical JSON encoding for wrapper types is the same as the wrapped primitive, which in the case of int64 and uint64 is a string.
> MyMessage.decode_json('{"int64value": "123"}')
What did you expect to see
A decoded protobuf object with the int64value field set:
This issue is still ongoing. Protobuf fails to decode large numbers, which in JSON are encoded as strings, back into numbers. This is a rather serious problem as languages like Ruby make extensive use of non-JSON-compliant numbers.
What version of protobuf and what language are you using?
Version: 3.9.1
Language: Ruby
What operating system (Linux, Windows, ...) and version?
OS X
What runtime / compiler are you using (e.g., python version or gcc version)
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin18]
What did you do?
Decode a JSON encoded message with an Int64Value or an UInt64Value field. The canonical JSON encoding for wrapper types is the same as the wrapped primitive, which in the case of int64 and uint64 is a string.
What did you expect to see
A decoded protobuf object with the
int64value
field set:What did you see instead?
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered: