Describe the bug
since https://github.com/mikefarah/yq/releases/tag/v4.32.1 and more specifically #1582 a JSON input file is now auto-detected as JSON - instead of the previous YAML default format.
which implies that the output is automatically set to JSON format - instead of being YAML previously (= in the previous versions)
the impact is that for a single output value, the result is now wrapped in quotes.
Version of yq: 4.32.1
Operating system: mac and linux
Installed via: binary release and homebrew
Input JSON
data.json:
Command
The command you ran:
Actual behavior
Expected behavior
(which was the actual behaviour in v4.31.2 and older versions)
Additional context
- forcing a YAML output "fixes" the issue:
yq -oy '.version' test.json
Describe the bug
since https://github.com/mikefarah/yq/releases/tag/v4.32.1 and more specifically #1582 a JSON input file is now auto-detected as JSON - instead of the previous YAML default format.
which implies that the output is automatically set to JSON format - instead of being YAML previously (= in the previous versions)
the impact is that for a single output value, the result is now wrapped in quotes.
Version of yq: 4.32.1
Operating system: mac and linux
Installed via: binary release and homebrew
Input JSON
data.json:
{"version": "1.2.3"}Command
The command you ran:
Actual behavior
Expected behavior
(which was the actual behaviour in v4.31.2 and older versions)
Additional context
yq -oy '.version' test.json