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
YAML can represent data structures that other formats supported by yq cannot, for example, graphs of objects that have cycles in them.
yq
Here's a YAML representation of an array containing a single element: itself.
--- &1 - *1
If I ask yq to give me the JSON representation, it gives incorrect output.
> yq --output-format json . self-referential.yaml [ [ [] ] ]
The problem is that the input is not properly representable in JSON. This should produce an error.
Version of yq: 4.44.3 Operating system: macOS 14.7 Installed via: homebrew
Input YAML
data1.yml:
Command
yq --output-format json . data1.yml
Actual behavior
[ [ [] ] ]
with an exit code of 0.
0
Expected behavior
Error with a non-0 exit code.
Additional context
None.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
YAML can represent data structures that other formats supported by
yq
cannot, for example, graphs of objects that have cycles in them.Here's a YAML representation of an array containing a single element: itself.
If I ask
yq
to give me the JSON representation, it gives incorrect output.The problem is that the input is not properly representable in JSON. This should produce an error.
Version of yq: 4.44.3
Operating system: macOS 14.7
Installed via: homebrew
Input YAML
data1.yml:
Command
Actual behavior
with an exit code of
0
.Expected behavior
Error with a non-
0
exit code.Additional context
None.
The text was updated successfully, but these errors were encountered: