Skip to content

feat: Support serde_json's arbitrary_precision feature#102

Merged
davidhewitt merged 5 commits intodavidhewitt:mainfrom
jpmckinney:arbitrary_precision
Feb 18, 2026
Merged

feat: Support serde_json's arbitrary_precision feature#102
davidhewitt merged 5 commits intodavidhewitt:mainfrom
jpmckinney:arbitrary_precision

Conversation

@jpmckinney
Copy link
Contributor

@jpmckinney jpmckinney commented Nov 26, 2025

closes #101

I'm not sure of your preferences with respect to errors and tests. I think the errors are unreachable unless a user specially crafts JSON that uses $serde_json::private::Number (which is an issue that has been reported to serde-json).

Edit: I force-pushed a new commit. Original commit would convert large JSON integers to floats.

Copy link
Owner

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks for this, and sorry for the very slow review.

Seems like this is the right approach to handle this case. Ouch.

Can you please add:

  • CHANGELOG entry
  • Note of this feature in the README (maybe in a new # Features section)
  • Adjust CI to run both with and without this feature enabled

... and then let's get this merged.

…g. ci: Run tests for arbitrary_precision feature.
@jpmckinney
Copy link
Contributor Author

Done!

@jpmckinney
Copy link
Contributor Author

Yeah, I was a little surprised to learn how serde-json handles arbitrary precision 👀

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.56%. Comparing base (d22654a) to head (5032543).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/de.rs 33.33% 2 Missing ⚠️
src/ser.rs 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
- Coverage   83.69%   83.56%   -0.13%     
==========================================
  Files           3        3              
  Lines        1067     1065       -2     
  Branches     1067     1065       -2     
==========================================
- Hits          893      890       -3     
- Misses        116      118       +2     
+ Partials       58       57       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidhewitt davidhewitt merged commit a444b75 into davidhewitt:main Feb 18, 2026
32 of 34 checks passed
@jpmckinney jpmckinney deleted the arbitrary_precision branch February 18, 2026 16:00
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.

Add support for serde-json arbitrary_precision

2 participants

Comments