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
Google's spec for converting between proto3 and JSON[1] specifies that 64 bit integers should be encoded as JSON strings instead of JSON numbers. I think it would be a good idea to follow that because:
Javascript cannot represent all 64 bit integers in its native numerical type.
It would allow the full range of uint64 to be used.
However, the spec also states that 64 bit integers encoded as JSON numbers should be accepted (i.e. be permissive). Following that may not be a good idea because it could appear to work when testing with small integers but fail with larger integers that Jansson cannot handle.
Would you be interested in a pull request for this? Do you have any other insight I should be aware of?
Google's spec for converting between proto3 and JSON[1] specifies that 64 bit integers should be encoded as JSON strings instead of JSON numbers. I think it would be a good idea to follow that because:
However, the spec also states that 64 bit integers encoded as JSON numbers should be accepted (i.e. be permissive). Following that may not be a good idea because it could appear to work when testing with small integers but fail with larger integers that Jansson cannot handle.
Would you be interested in a pull request for this? Do you have any other insight I should be aware of?
[1] https://developers.google.com/protocol-buffers/docs/proto3#json
The text was updated successfully, but these errors were encountered: