Skip to content
New issue

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

delimiter @ end of record #4

Open
Schmieta opened this issue Dec 3, 2021 · 1 comment
Open

delimiter @ end of record #4

Schmieta opened this issue Dec 3, 2021 · 1 comment

Comments

@Schmieta
Copy link

Schmieta commented Dec 3, 2021

How should my parser treat a delimiter character at end-of-record. Ignore it or create an empty field?

@jimeh
Copy link
Member

jimeh commented Dec 5, 2021

Clause 5 of the spec covers this:

  1. The last field in a record MUST NOT be followed by a comma. This results in a
    additional field with nothing in it.

    CSV:

    aaa,bbb,ccc,¬
    xxx,yyy,zzz,¬
    

    JSON:

    [ ["aaa", "bbb", "ccc", ""],
      ["xxx", "yyy", "zzz", ""] ]

I'm happy to discus further if you have any more questions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants