You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My read of the yaml spec is that when only a key is present in a mapping, the value should be interpreted as null. While yq does this for block mappings, it assumes empty-string for inline mappings.
Version of yq: v4.45.1
Operating system: mac
Installed via: homebrew
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:
{x}
Command
The command you ran:
echo '{x}' | yq .
Actual behavior
{x: ''}
Expected behavior
{x: null}
Additional context
The expected behavior is also produced by pyyaml.
The text was updated successfully, but these errors were encountered:
Describe the bug
My read of the yaml spec is that when only a key is present in a mapping, the value should be interpreted as
null
. Whileyq
does this for block mappings, it assumes empty-string for inline mappings.Version of yq: v4.45.1
Operating system: mac
Installed via: homebrew
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:
{x}
Command
The command you ran:
Actual behavior
{x: ''}
Expected behavior
{x: null}
Additional context
The expected behavior is also produced by pyyaml.
The text was updated successfully, but these errors were encountered: