Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

More correctly titled, "I Don't Like CSV".


Hahahah. Allow me to submit mine as well:

"I Cannot Fathom A Use Case For CSV So I Would Like To Ban Everyone From Using It For Any Reason"


There are probably valid uses for CSV, but more often than not, it's the wrong choice.

As soon as data has any form of structure to it (and most data does). CSV complicates everything. Even for unstructured data, the problem of escape characters often shows it's ugly head. The moment your data contains a comma, tab, or space, you run into a nasty mess that, in the best case makes your system fail, and in the worst case silently adds corrupt data into the system.

Neither JSON nor XML suffer from that problem and both can easily be used in any scenario you'd use CSV. The only argument against either format is they are a bit more bulky than CSV.


Just an FYI, JSON and XML both have characters that need to be escaped properly.


Correct, and those methods of escaping are clearly defined in both specs. In CSV, there is no universal escaping system. It's all over the board.

Any variable length text data format is going to run into issues when special characters are used in the data. CSV has no definition of what should happen when that occurs.


The characters to escape are clearly defined in both specs, but that doesn't mean there's a universal escaping system. Just google "how to escape JSON" and you will see the wealth of users struggling to understand what and how to accomplish this. There will always be people struggling with escape characters, I don't see it being any harder or easier in any format.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: