Skip to content

x.json2: fix decode_number for u8#26033

Merged
spytheman merged 1 commit into
vlang:masterfrom
kbkpbot:fix-json2-decode-number
Dec 19, 2025
Merged

x.json2: fix decode_number for u8#26033
spytheman merged 1 commit into
vlang:masterfrom
kbkpbot:fix-json2-decode-number

Conversation

@kbkpbot

@kbkpbot kbkpbot commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Fix issue #26027

two digits u8 decode may fail with origin code.
Use strconv.atoxx instead.

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.
Can you please also add cases for the other primitive types, used as fields?

@enghitalo

Copy link
Copy Markdown
Contributor

Some performance impact?

@spytheman

Copy link
Copy Markdown
Contributor

Some performance impact?

correctness is more important

@spytheman spytheman merged commit fd31771 into vlang:master Dec 19, 2025
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

x.json2 fails to decode correct json it generated. Invalid json: Data: expected integer but got real number "g": 58,

3 participants