{"id":9471,"date":"2014-09-03T16:47:25","date_gmt":"2014-09-03T20:47:25","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=9471"},"modified":"2019-08-05T16:48:52","modified_gmt":"2019-08-05T20:48:52","slug":"writing-a-csv-parser","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/09\/03\/writing-a-csv-parser\/","title":{"rendered":"Writing a CSV Parser"},"content":{"rendered":"<p><a href=\"http:\/\/tburette.github.io\/blog\/2014\/05\/25\/so-you-want-to-write-your-own-CSV-code\/\">Thomas Burette<\/a>:<\/p>\n<blockquote cite=\"http:\/\/tburette.github.io\/blog\/2014\/05\/25\/so-you-want-to-write-your-own-CSV-code\/\"><p>If a supplied CSV is arbitrary, the only real way to make sure the data is correct is for an user to check it and eventually specify the delimiter, quoting rule,... Barring that you may end up with a error or worse silently corrupted data.<\/p>\n<p>Writing CSV code that works with files out there in the real world is a difficult task. The rabbit hole goes deep. Ruby CSV library is 2321 lines.<\/p><\/blockquote>\n<p>On the surface, it seems like almost a one-liner.<\/p>","protected":false},"excerpt":{"rendered":"<p>Thomas Burette: If a supplied CSV is arbitrary, the only real way to make sure the data is correct is for an user to check it and eventually specify the delimiter, quoting rule,... Barring that you may end up with a error or worse silently corrupted data. Writing CSV code that works with files out [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-08-05T20:48:54Z","apple_news_api_id":"7db78e65-04f5-4392-a1f4-9e56a0ad67e4","apple_news_api_modified_at":"2019-08-05T20:48:54Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AfbeOZQT1Q5Kh9J5WoK1n5A","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[1857,270,71],"class_list":["post-9471","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-csv","tag-parser","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=9471"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9471\/revisions"}],"predecessor-version":[{"id":9472,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9471\/revisions\/9472"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=9471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=9471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=9471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}