Live data from Hacker News

CSVJSON – Self Rise of an Online Tool

medium.com

11–20 of 36 posts

Re: CSVJSON – Self Rise of an Online Tool

#11
Having actually written something like this before --- and it remains on my machine as an executable of only a few kilobytes --- I'm curious about the thought process that could lead to someone uploading a considerable volume of potentially sensitive CSV data to this site, and then downloading a proportionally larger amount of JSON from it.

The site doesn't even appear to support HTTPS.

Re: CSVJSON – Self Rise of an Online Tool

#13

from 15000 quality page views you should expect at least $15 of revenue ($1 CPM) even higher numbers from developers (valuable users). Check out something like https://carbonads.net/ and it might at least pay for your hosting. It's invite only though, so you might have to ask for an invitation.

We put ads on sqlizer.io for a while. The CPM numbers were terrible. I think developers all run Adblock.

Re: CSVJSON – Self Rise of an Online Tool

#15

Having actually written something like this before --- and it remains on my machine as an executable of only a few kilobytes --- I'm curious about the thought process that could lead to someone uploading a considerable volume of potentially sensitive CSV data to this site, and then downloading a proportionally larger amount of JSON from it. The site doesn't even appear to support HTTPS.

Technically, all the file processing can happen client-side now, thanks to the HTMl5 file API. Users' data doesn't have to leave the browser.

[shameless plug] This is the approach I have taken creating a similar converter (which also works offline):

http://mango-is.com/tools/csv-to-json/

Re: CSVJSON – Self Rise of an Online Tool

#16
The funny thing is, very capable libraries already exist to handle CSV parsing.

I know because I authored jquery-csv, te first RFC complete CSV parser implementation in vanilla JS.

The transform is ridiculously simple and data can be fully loaded and processed client-side using the HTML5 File API.

As soon as JS gets the :: function bind operator I plan to reimplement it as a pure async function.

Re: CSVJSON – Self Rise of an Online Tool

#17
post #3

Thanks, I've used your tool a few times and it works beautifully. Quite interesting article too from the SEO pov. BTW, does anyone know of a tool to do the reverse? I have some json files with deeply nested arrays and would like to output a csv file with one line for each "leaf". I can write it myself but would be happy to use an existing tool.

> BTW, does anyone know of a tool to do the reverse? I created a java/scala library[1] (source is scala, but there's a jar with dependencies for java) a few years ago for an Android app I was hired to work on that converts nested JSON to CSV. I was allowed to open source the library later on and released it under the MIT License, so anyone can use it now. Never thought anyone else would ever need to convert json to c…

Yes. Use the built-in JSON.parse() to get the data into memory, then use my jquery-csv library's $.csv.fromArrays() to format the data as CSV.

Guess I found a good candidate for a blog post. It's amazing How much I see others struggle with such a aimple concept.

Re: CSVJSON – Self Rise of an Online Tool

#18
Honestly, I see JSON-to-CSV and the opposite tools as an anti-pattern.

You're essentially applying 2 pure function transforms to data so it should be done in 2 steps.

The built-in JSON.parse() provides a native implementation to handle the first transform. My jquery-csv lib handles the second. If you require stream processing and/or need to process large data sets client-side use the more fully featured PapaParse lib instead.

The number of half-assed CSV parser implementations I've seen in the wild is what drove me to provide a fully-featured RFC implementation. To do it right requires a DFA, anything less will fail on many hard-to-identify edge cases.

My project has been downloaded over half a million times, used on every platform/environment imaginable, and every technical limitation painfully identified. Seriously, I don't understand why devs feel the need to roll their own and miss out on benefiting from existing battle-tested solutions.

Not to mention all the devs who embed a wholesale copy of an old/outdated version of my lib in their projects.

Nowadays, half-assed CSV implementations have changed to half-assed JSON-to-CSV implementations. The same holds true for JSON and/or CSV to HTML transforms.

Formatting a HTML table by iterating over data is so painfully sinple I don't know why devs feel te need to provide it as a standalone library.

Re: CSVJSON – Self Rise of an Online Tool

#19

The funny thing is, very capable libraries already exist to handle CSV parsing. I know because I authored jquery-csv, te first RFC complete CSV parser implementation in vanilla JS. The transform is ridiculously simple and data can be fully loaded and processed client-side using the HTML5 File API. As soon as JS gets the :: function bind operator I plan to reimplement it as a pure async function.

Wow, I wish I had found your library when I wrote this. Looks like you published it around the same time I wrote it. I especially like the idea of client-side loading using the HTML5 file API. Things to consider for the future.

Re: CSVJSON – Self Rise of an Online Tool

#20

Having actually written something like this before --- and it remains on my machine as an executable of only a few kilobytes --- I'm curious about the thought process that could lead to someone uploading a considerable volume of potentially sensitive CSV data to this site, and then downloading a proportionally larger amount of JSON from it. The site doesn't even appear to support HTTPS.

If the information is sensitive, I sure hope the person does not upload it to the internet.
Post reply on HN