We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
int values with 7 or more digits become floats when parsed as json and outputted as yaml
Version of yq: 4.35.1 Operating system: mac Installed via: homebrew
Input Yaml
data1.yml:
[999999, 1000000, 1000001]
Command The command you ran:
yq -p json -o yaml data1.yaml
Actual behavior
- 999999 - 1e+06 - 1.000001e+06
Expected behavior
- 999999 - 1000000 - 1000001
Additional context not seeing ints getting mangled with -p yaml -o yaml, -p yaml -o json, or -p json -o json
-p yaml -o yaml
-p yaml -o json
-p json -o json
The text was updated successfully, but these errors were encountered:
Fixed number parsing as float bug in JSON #1756
e09779e
Thanks for raising - problem was that the JSON decoder would parse those numbers as floats. Will be fixed in the next release.
Sorry, something went wrong.
Fixed in 4.35.2
No branches or pull requests
Describe the bug
int values with 7 or more digits become floats when parsed as json and outputted as yaml
Version of yq: 4.35.1
Operating system: mac
Installed via: homebrew
Input Yaml
data1.yml:
[999999, 1000000, 1000001]
Command
The command you ran:
Actual behavior
Expected behavior
Additional context
not seeing ints getting mangled with
-p yaml -o yaml
,-p yaml -o json
, or-p json -o json
The text was updated successfully, but these errors were encountered: