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 The result of string concatenation with null varies depending on the order:
yq -n '"str" + null' -oj
yq -n 'null + "str"' -oj
jq -n '"str" + null'
jq -n 'null + "str"'
So when null was appended a string it end up as the string literal "null", but when appending a string to null, it end up as an empty string.
null
"null"
Meanwhile as a comparison, jq turns both null into "", namely empty strings.
""
Version of yq: 4.34.1 Operating system: mac Installed via: homebrew
Expected behavior I'd expect when converting null to a string, the result should be consistent in both case, regardless the order of the operands.
The text was updated successfully, but these errors were encountered:
Fixed string, null concact consistency #1712
55c0d48
Thanks for raising - will update so that "str" + null = "str" :)
Sorry, something went wrong.
Fixed in 4.35.2
No branches or pull requests
Describe the bug
The result of string concatenation with null varies depending on the order:
yq -n '"str" + null' -oj
yq -n 'null + "str"' -oj
jq -n '"str" + null'
jq -n 'null + "str"'
So when
null
was appended a string it end up as the string literal"null"
, but when appending a string tonull
, it end up as an empty string.Meanwhile as a comparison, jq turns both
null
into""
, namely empty strings.Version of yq: 4.34.1
Operating system: mac
Installed via: homebrew
Expected behavior
I'd expect when converting
null
to a string, the result should be consistent in both case, regardless the order of the operands.The text was updated successfully, but these errors were encountered: