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

Behaviour of toJSON with digits=NA changed from 1.8.4 -> 1.8.5 #420

Closed
andrjohns opened this issue Jun 23, 2023 · 2 comments
Closed

Behaviour of toJSON with digits=NA changed from 1.8.4 -> 1.8.5 #420

andrjohns opened this issue Jun 23, 2023 · 2 comments

Comments

@andrjohns
Copy link

The 1.8.5 update appears to have introduced some floating-point-ness issue when converting to JSON with max precision:

> packageVersion("jsonlite")
[1] ‘1.8.4’
> jsonlite::toJSON(list(a=c(0.1, 0.2, 0.3)), digits=NA)
{"a":[0.1,0.2,0.3]} 
> packageVersion("jsonlite")
[1] ‘1.8.5’
> jsonlite::toJSON(list(a=c(0.1, 0.2, 0.3)), digits=NA)
{"a":[0.10000000000000001,0.20000000000000001,0.29999999999999999]} 
@jeroen
Copy link
Owner

jeroen commented Jul 14, 2023

Fyi this was fixed in jsonlite 1.8.5

@zeehio
Copy link

zeehio commented Oct 21, 2023

Fyi this was fixed in jsonlite 1.8.5

A minor typo 😉:

According to 120cca8, this regression was fixed in 1.8.7.

Version 1.8.5 introduced the regression

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

No branches or pull requests

3 participants