![]() ![]() There are other differences but they do not matter in terms of conversion between the two formats. The difference between CSV or TSV and JSON is that in JSON the key or parameter is repeated in every row or object. The difference between a CSV and TSV is only the separator used in between the value: CSV uses a comma and TSV uses a tab. Also, a TSV or CSV to JSON conversion function in JavaScript is pretty simple. ![]() ![]() That is an option, and there are many converters out there, but what about transferring more data over the network? CSV and TSV are always going to be smaller than JSON and I like that, so often times, I actually prefer to load a CSV file into the page and convert it into JSON with JavaScript. You could argue that I should just convert the data into JSON before loading it onto the page, especially since at the end of the day I will need to convert it into a JavaScript object. D3.js supports it out of the box which is awesome but often times I need to convert CSV to JSON without loading D3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |