Open
Description
Describe the bug
For whatever reason, yaml allows maps and sequences to be map keys. These seem to be interpreted as empty string when producing json.
Version of yq: v4.45.1
Operating system: mac
Installed via: homebrew
Input Yaml
data1.yml:
{}:
{x}:
[x]:
Command
The command you ran:
cat data1.yml | yq -o json .
Actual behavior
{
"": null,
"": null,
"": null
}
Expected behavior
{
"{}": null,
"{x}": null,
"[x]": null
}