Reading — step 1 of 5
Read
~1 min readQuoting
Quoted Fields
When a field contains the delimiter (or newlines, or quotes), wrap it in ":
name,description,tags
Alice,"web developer, backend",python
Bob,"says ""hi""",java
Carol,"multi
line",none
"web developer, backend"— comma inside is preserved."says ""hi"""— escape"by doubling:""."multi\nline"— newline inside the field doesn't end the row.
Parser logic:
python
Key insight: a " ENDS the field unless followed by another " (an escape).
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…