Title: [BUG] Gson deserialization treats integers as doubles, breaking downstream serializers · Issue #622 · optimizely/java-sdk · GitHub
Open Graph Title: [BUG] Gson deserialization treats integers as doubles, breaking downstream serializers · Issue #622 · optimizely/java-sdk
X Title: [BUG] Gson deserialization treats integers as doubles, breaking downstream serializers · Issue #622 · optimizely/java-sdk
Description: Is there an existing issue for this? I have searched the existing issues SDK Version 4.4.0 Current Behavior When using JSON variables with GsonConfigParser, integers within JSON variables appear as doubles to outside consumers. The Map o...
Open Graph Description: Is there an existing issue for this? I have searched the existing issues SDK Version 4.4.0 Current Behavior When using JSON variables with GsonConfigParser, integers within JSON variables appear as...
X Description: Is there an existing issue for this? I have searched the existing issues SDK Version 4.4.0 Current Behavior When using JSON variables with GsonConfigParser, integers within JSON variables appear as...
Opengraph URL: https://github.com/optimizely/java-sdk/issues/622
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Gson deserialization treats integers as doubles, breaking downstream serializers","articleBody":"### Is there an existing issue for this?\n\n- [x] I have searched the existing issues\n\n### SDK Version\n\n4.4.0\n\n### Current Behavior\n\nWhen using JSON variables with `GsonConfigParser`, integers within JSON variables appear as doubles to outside consumers. The `Map` output then can't be returned to valid JSON for use with downstream JSON parsing tools, like kotlinx.serialization.\n\n### Expected Behavior\n\nInteger-looking JSON values are deserialized to longs, while decimal-looking JSON values are deserialized to doubles.\n\n### Steps To Reproduce\n\nSee associated pull request.\n\n### Java Version\n\n21\n\n### Link\n\n_No response_\n\n### Logs\n\n_No response_\n\n### Severity\n\nMinor issue\n\n### Workaround/Solution\n\nRe-interpret doubles as integers where needed.\n\n### Recent Change\n\n_No response_\n\n### Conflicts\n\n_No response_","author":{"url":"https://github.com/jamiesanson","@type":"Person","name":"jamiesanson"},"datePublished":"2026-05-06T08:44:09Z","url":"https://github.com/optimizely/java-sdk/issues/622"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cda90f48-f0e8-edd1-6546-00b277f65996 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E48A:DE66A:B304D:F58B2:6B045563 |
| html-safe-nonce | 31707807ebb4e5ff2d220dd914a73a0d98b8da820e1fcc93ba50b5827d5f68c3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDhBOkRFNjZBOkIzMDREOkY1OEIyOjZCMDQ1NTYzIiwidmlzaXRvcl9pZCI6Ijc0Mjc3NDAzOTY1MzA0NTU5MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 91ceda8abe1fbfd7d7dad4b139ad3415cb11bb4bb21dc81dda311e83f80515db |
| hovercard-subject-tag | issue:4389970725 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/optimizely/java-sdk/622/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e924af2ead085a35e881ddb9dcd833617e75fa22a6c05926f88b53f25fbff207/optimizely/java-sdk/issues/622 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e924af2ead085a35e881ddb9dcd833617e75fa22a6c05926f88b53f25fbff207/optimizely/java-sdk/issues/622 |
| og:image:alt | Is there an existing issue for this? I have searched the existing issues SDK Version 4.4.0 Current Behavior When using JSON variables with GsonConfigParser, integers within JSON variables appear as... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jamiesanson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| turbo-cache-control | no-preview |
| go-import | github.com/optimizely/java-sdk git https://github.com/optimizely/java-sdk.git |
| octolytics-dimension-user_id | 1274132 |
| octolytics-dimension-user_login | optimizely |
| octolytics-dimension-repository_id | 64257587 |
| octolytics-dimension-repository_nwo | optimizely/java-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 64257587 |
| octolytics-dimension-repository_network_root_nwo | optimizely/java-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width