-
Notifications
You must be signed in to change notification settings - Fork 288
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
Fix incorrect JsonProvider numeric inference #1222
Fix incorrect JsonProvider numeric inference #1222
Conversation
Apologies for the formatting changes. I didn't do anything to change the formatting. Should I try to revert that? |
|
||
[<Test>] | ||
let ``Getting field with numeric values should infer decimal``() = | ||
let json = JsonProvider<""" { "a":[1.0, 1.0] } """>.GetSample() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is supposed to infer decimal
, but I could be wrong.
Appears these new lines are the issue: https://github.com/fsharp/FSharp.Data/blob/8d05e4bf32fe750cb0f1bad977cbd5b97b39ab17/src/Json/JsonInference.fs#L34-L35 What's wanted here? I would expect the format of the number to override the use of |
Personally I think the single flag for |
Preserve floats when exponetials are detected
Close/open to re-run CI |
Closing this out as the repo has diverged a long way since the proposal was made |
We ultimately never upgraded and are stuck on FSharp.Data 3.3.3. Has this been fixed in a different PR by any chance? |
See #1221
Hypothesis is that commit 8d05e4b is not quite correct.