Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable decimal_floats by default for Value::Number(Float) roundtrip #363

Merged
merged 3 commits into from
Feb 19, 2022

Conversation

juntyr
Copy link
Member

@juntyr juntyr commented Jan 28, 2022

  • I've included my change in CHANGELOG.md

Fixes #337

@juntyr
Copy link
Member Author

juntyr commented Jan 28, 2022

?r @torkleyy This PR simply makes decimal_floats on by default
(a) as it fixes #337 as integer floats are now serialized as decimals by default
(b) imo it also looks nicer

@juntyr juntyr mentioned this pull request Feb 2, 2022
Copy link
Collaborator

@kvark kvark left a comment

Choose a reason for hiding this comment

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

Does it even need to be an option?
I would think just removing the option entirely and doing this unconditionally would be better.

@juntyr
Copy link
Member Author

juntyr commented Feb 19, 2022

@kvark Does it even need to be an option? I would think just removing the option entirely and doing this unconditionally would be better.

That's a good idea - thanks for the suggestion! This commit will of course require a version bump as it is a breaking change, though I guess the usefulness of not including a decimal was questionable from the start.

@juntyr juntyr merged commit 7092d0e into ron-rs:master Feb 19, 2022
@juntyr juntyr deleted the value-float-roundtrip branch February 19, 2022 05:15
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.

Round-trip failure: ser -> de transforms Float(1.0) into Integer(1)
2 participants