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

Infinite and NaN are printed in String #62

Closed
itchyny opened this issue Mar 15, 2020 · 1 comment · Fixed by #246
Closed

Infinite and NaN are printed in String #62

itchyny opened this issue Mar 15, 2020 · 1 comment · Fixed by #246
Labels

Comments

@itchyny
Copy link
Contributor

itchyny commented Mar 15, 2020

jq prints 1.7976931348623157e+308 for infinite and null for NaN

 % jq -n 'infinite, infinite/infinite'
1.7976931348623157e+308
null
 % java -jar jackson-jq-cli-1.0.0-preview.20191208.jar -n -- 'infinite, infinite/infinite'
"Infinity"
"NaN"
@Jiehong
Copy link

Jiehong commented Mar 12, 2021

Perhaps jq should change here? null and NaN are quite different IMO.

Funny though.

itchyny added a commit to itchyny/jackson-jq that referenced this issue Dec 6, 2022
eiiches added a commit that referenced this issue Dec 6, 2022
Fix outputting NaN and Infinities to be jq compatible (fix #62)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants