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

format json with decimal number is wrong #100

Open
ghost opened this issue Apr 10, 2017 · 1 comment
Open

format json with decimal number is wrong #100

ghost opened this issue Apr 10, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 10, 2017

Format json with decimal number is wrong. Version: v2017.03.23.23.32.07

Example, source json:

{"balance": 10000.0, "interestRate": 39.99, "payments": [], "status": "approved"}

format json:

{
"balance": 10000.0,
"interestRate": 39.990000000000002,
"payments": [],
"status": "approved"
}

Field value "interestRate" content extra simbols.

@Leyline77
Copy link

I too see this issue.
it is converting numbers to float, I think it should treat them as strings, but leave quotes off on output.

Source:
{ "Amount": 9365.10, "key2": "ok"}

Formatted:
{
"Amount": 9365.1000000000004,
"key2": "ok"
}

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

1 participant