Skip to content

[v2] Preserve integer precision when decoding JSON into any - #4018

Merged
mandre merged 1 commit into
v2from
bp-v2-97b1e61
Sep 17, 2026
Merged

mandre merged 1 commit into
v2from
bp-v2-97b1e61

Conversation

@gophercloud-backport-bot

Copy link
Copy Markdown

Backport: #4017

Extract() round-trips Result.Body through json.Marshal. Decoding into any as float64 rounds signed 64-bit maximum values, so BIOS upper_bound 9223372036854775807 fails unmarshal into int. Use json.Decoder.UseNumber() so those integers survive Extract().

Fixes #4016

Extract() round-trips Result.Body through json.Marshal. Decoding into
any as float64 rounds signed 64-bit maximum values, so BIOS
upper_bound 9223372036854775807 fails unmarshal into int. Use
json.Decoder.UseNumber() so those integers survive Extract().
@github-actions github-actions Bot added edit:networking This PR updates networking code v2 This PR targets v2 edit:baremetal This PR updates baremetal code edit:gophercloud This PR updates common Gophercloud code semver:patch No API change labels Sep 17, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 64.014% (-0.02%) from 64.032% — bp-v2-97b1e61 into v2

@mandre
mandre merged commit dc18c45 into v2 Sep 17, 2026
22 checks passed
@mandre
mandre deleted the bp-v2-97b1e61 branch September 17, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edit:baremetal This PR updates baremetal code edit:gophercloud This PR updates common Gophercloud code edit:networking This PR updates networking code semver:patch No API change v2 This PR targets v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants