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
With too many columns, decodeByName silently throws away the extra columns:
> decodeByName "a,b,c\n1,2,3,4" :: Either String (Header, V.Vector (HM.HashMap String String))
Right (["a","b","c"],[fromList [("a","1"),("b","2"),("c","3")]])
It also happily parses a row with too few:
> decodeByName "a,b,c\n1,2" :: Either String (Header, V.Vector (HM.HashMap String String))
Right (["a","b","c"],[fromList [("a","1"),("b","2")]])
Is there (or should there be) a parsing mode which requires the same number of columns per row as there are header rows? There seems to be support from the spec:
Each line should contain the same number of fields throughout the file.
With too many columns,
decodeByName
silently throws away the extra columns:It also happily parses a row with too few:
Is there (or should there be) a parsing mode which requires the same number of columns per row as there are header rows? There seems to be support from the spec:
https://tools.ietf.org/html/rfc4180
The text was updated successfully, but these errors were encountered: