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
Describe the bug
Given CSV with colon symbol in any value, the output YAML is not sanitized and the text preceding the colon is considered as part of key not part of value
Version of yq: 4.34.2
Operating system: windows
Installed via: binary release
Input CSV
data1.csv:
Index,Foo
1,Bar
2,ERROR: Baz not found
Command
yq -p=csv '.' .\data1.csv
Actual behavior
- Index: 1Foo: Bar
- Index: 2Foo:
ERROR: Baz not found
Expected behavior
- Index: 1Foo: Bar
- Index: 2Foo: "ERROR: Baz not found"
Additional info
Since users probably want to use some more complex query
e.g.
yq -p=csv -o=csv '.|map(.Foo)' .\data1.csv
they see the error
Error: csv encoding only works for arrays of scalars (string/numbers/booleans), child[1] is a !!map
instead so I include this error message here for SEO
The text was updated successfully, but these errors were encountered:
Describe the bug
Given CSV with colon symbol in any value, the output YAML is not sanitized and the text preceding the colon is considered as part of key not part of value
Version of yq: 4.34.2
Operating system: windows
Installed via: binary release
Input CSV
data1.csv:
Command
Actual behavior
Expected behavior
Additional info
Since users probably want to use some more complex query
e.g.
they see the error
instead so I include this error message here for SEO
The text was updated successfully, but these errors were encountered: