Skip to content
New issue

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

64-bit integers should be represented as strings in JSON #1205

Closed
jskeet opened this issue Sep 6, 2022 · 0 comments · Fixed by #1206 or #1207
Closed

64-bit integers should be represented as strings in JSON #1205

jskeet opened this issue Sep 6, 2022 · 0 comments · Fixed by #1206 or #1207
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jskeet
Copy link
Contributor

jskeet commented Sep 6, 2022

compliance-suite.json includes "extreme" 64-bit integer values in numeric form. The proto3 JSON spec states that int64 values should be encoded as strings to avoid a loss of precision, although they can be parsed as numbers.

@jskeet jskeet added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 6, 2022
jskeet added a commit to jskeet/gapic-showcase that referenced this issue Sep 6, 2022
JSON numbers are only really expected to be precise as far as IEEE-754 64-bit binary floating point numbers; that means precision is lost for very large integers.
The proto3 JSON specification says that 64-bit integers should be encoded as strings, although numeric values can be parsed.

Fixes googleapis#1205
@jskeet jskeet closed this as completed in c9d9ff1 Sep 6, 2022
gcf-merge-on-green bot pushed a commit that referenced this issue Mar 7, 2023
🤖 I have created a release *beep* *boop*
---


## [0.26.0](https://togithub.com/googleapis/gapic-showcase/compare/v0.25.0...v0.26.0) (2023-03-07)


### Features

* **go:** Update Go version to 1.19 ([#1225](https://togithub.com/googleapis/gapic-showcase/issues/1225)) ([d4b108e](https://togithub.com/googleapis/gapic-showcase/commit/d4b108e16dc91c0ea6d4dec3dca4d3270d3bf47a))


### Bug Fixes

* Build assets for darwin/arm64 ([#1267](https://togithub.com/googleapis/gapic-showcase/issues/1267)) ([0833a57](https://togithub.com/googleapis/gapic-showcase/commit/0833a579131c14582b053f26698fdfe93e465d87))
* Export showcase_v1beta1.yaml from BUILD.bazel to support external GAPIC generation ([#1223](https://togithub.com/googleapis/gapic-showcase/issues/1223)) ([5076348](https://togithub.com/googleapis/gapic-showcase/commit/507634898e208b7ff88784e4ec5f0efd22bff9ab))
* Handle x-http-method-override for PATCH as POST ([#1262](https://togithub.com/googleapis/gapic-showcase/issues/1262)) ([4070ce3](https://togithub.com/googleapis/gapic-showcase/commit/4070ce331bd5e852ccb2f4f2267dce80a9dda9c4))
* Use quotes around extreme int64 values ([#1206](https://togithub.com/googleapis/gapic-showcase/issues/1206)) ([c9d9ff1](https://togithub.com/googleapis/gapic-showcase/commit/c9d9ff191bfd72fe8563625be4074fe4659585d6)), closes [#1205](https://togithub.com/googleapis/gapic-showcase/issues/1205)

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
1 participant