Skip to content

Deserialize integers as longs when using Gson - #623

Open
jamiesanson wants to merge 4 commits into
optimizely:masterfrom
jamiesanson:js/gson-deserialize-integers
Open

Deserialize integers as longs when using Gson#623
jamiesanson wants to merge 4 commits into
optimizely:masterfrom
jamiesanson:js/gson-deserialize-integers

Conversation

@jamiesanson

@jamiesansonjamiesanson commented May 6, 2026

Copy link
Copy Markdown

Summary

Deserialize integers as longs when using Gson. This allows users to then use the resultant Map in downstream serializers more easily.

Note: This is a breaking change in the case where consumers were relying on the double output. It's more correct, so feels worth taking, but feel free to hold this PR until you plan to release a new major version!

Issues

Fixes#622

@jamiesanson
jamiesansonforce-pushed the js/gson-deserialize-integers branch from c3bc3c2 to 1062edfCompareMay 6, 2026 09:27
@FarhanAnjum-optiFarhanAnjum-opti added the acknowledged The issue has been acknowledged and being looked into. Further details will follow. label May 6, 2026
@FarhanAnjum-opti

Copy link
Copy Markdown
Contributor

Hi @jamiesanson, thanks for submitting this and putting in the work on the code. Before we can bring your PR into our workflow, please sign the CLA here . Once that’s done, we’ll be able to move forward.

@FarhanAnjum-opti

Copy link
Copy Markdown
Contributor

@jamiesanson, once you’ve signed the form, could you please confirm here on the PR as well for future reference? You can just comment something like "Signed".

@jamiesanson

Copy link
Copy Markdown
Author

Ah of course! Signed.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acknowledgedThe issue has been acknowledged and being looked into. Further details will follow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Gson deserialization treats integers as doubles, breaking downstream serializers

2 participants

@jamiesanson@FarhanAnjum-opti