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

#68: properly detect if a number if a float or int #79

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

adamw
Copy link
Contributor

@adamw adamw commented Aug 29, 2019

Floating-point numbers without decimal part where incorrectly serialised as !!int 22.2 (for example).

The new method is still not very sophisticated, but seems to do the job :)

@adamw
Copy link
Contributor Author

adamw commented Aug 29, 2019

See also #68 and softwaremill/tapir#207

@codecov-io
Copy link

codecov-io commented Aug 29, 2019

Codecov Report

Merging #79 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #79      +/-   ##
=========================================
- Coverage   99.11%   99.1%   -0.01%     
=========================================
  Files           4       4              
  Lines         113     112       -1     
  Branches        6       7       +1     
=========================================
- Hits          112     111       -1     
  Misses          1       1
Impacted Files Coverage Δ
src/main/scala/io/circe/yaml/Printer.scala 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5120584...79d030b. Read the comment docs.

@travisbrown
Copy link
Member

👍, this looks like a good fix for now to me. For what it's worth I'm working on some deeper changes to the representation of numbers in 0.13 that will make this kind of thing a little less hacky.

@guersam
Copy link

guersam commented Oct 27, 2019

👍 I'm suffering from softwaremill/tapir#207 as well and it seems to be a nice workaround for now.

@travisbrown travisbrown merged commit ec4c896 into circe:master Nov 12, 2019
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.

4 participants