Live data from Hacker News

Show HN: Transform a CSV into a JSON and vice versa

jsonmatic.com

31–40 of 111 posts

Re: Show HN: Transform a CSV into a JSON and vice versa

#31
post #9

Earlier quoted context omitted.

Shouldn’t really matter too much if the response is being compressed. If you’re rendering the table in the DOM, the response size is the least of your issues.

Sometimes you fetch a large dataset and only show one page at a time in the DOM, or render it as a line in a chart or something. At a previous workplace we had CSV responses in the hundreds of megabytes.

That sounds incredible inefficient

What was the rational for such enormous single payloads?

Re: Show HN: Transform a CSV into a JSON and vice versa

#32
post #29

Earlier quoted context omitted.

I always try to use ascii char 31 (unit seperator) if I'm computationally generating csvs for shunting around data internally.

it's crazy how our progenitors had the wisdom and foresight to reserve FOUR distinct delimiters for us 28-31 file/group/record/unit but webdevs are just nope we'll go with commas and crlfs and when that doesn't work we'll JSON

ah, yes, CSVs. The format famously preferred and lauded by the web development community

Re: Show HN: Transform a CSV into a JSON and vice versa

#33

Earlier quoted context omitted.

A columnar structure is definitely popular in the analytics community, although there are binary formats that are faster to scan again and can be mmap'd for zero-copy access. The fundamental problem with CSV is that it has no canonical form or formal construction. Even the RFC documents it by example and historical reference, rather than from first principles, and does so with liberal use of "maybe". Consequently bei…

+1 - If you are looking for something JSON-compatible, JSON Lines (one json object per line - https://jsonlines.org/ ) is pretty popular as well. You could store a CSV in JSONL very easily. In fact, jsonlines' website shows it as its first example: https://jsonlines.org/examples/ And if you wanted something that is json file-wide, you can just add some commas and wrap in [] for a list of rows.

Oh no, this is so similar to http://ndjson.org/

Re: Show HN: Transform a CSV into a JSON and vice versa

#35
post #34

Looks a bit like adware IMO. The library appears to be drenched in analytics. Dependencies include: https://www.npmjs.com/package/web-vitals/v/0.1.0 https://www.npmjs.com/package/@fingerprintjs/fingerprintjs Harvesting user's data, most likely...

How did you figure this out?

Re: Show HN: Transform a CSV into a JSON and vice versa

#37
post #34

Looks a bit like adware IMO. The library appears to be drenched in analytics. Dependencies include: https://www.npmjs.com/package/web-vitals/v/0.1.0 https://www.npmjs.com/package/@fingerprintjs/fingerprintjs Harvesting user's data, most likely...

How did you figure this out?

The page has a link at the bottom to the GitHub project where you check the dependencies...

Re: Show HN: Transform a CSV into a JSON and vice versa

#38
post #29

Earlier quoted context omitted.

I always try to use ascii char 31 (unit seperator) if I'm computationally generating csvs for shunting around data internally.

it's crazy how our progenitors had the wisdom and foresight to reserve FOUR distinct delimiters for us 28-31 file/group/record/unit but webdevs are just nope we'll go with commas and crlfs and when that doesn't work we'll JSON

Not sure I've seen a classic Unix tool utilize \x28-\x31 by default. Ignoring standards in ascii was I'm vogue long before webdevs.

Re: Show HN: Transform a CSV into a JSON and vice versa

#39
post #34

Looks a bit like adware IMO. The library appears to be drenched in analytics. Dependencies include: https://www.npmjs.com/package/web-vitals/v/0.1.0 https://www.npmjs.com/package/@fingerprintjs/fingerprintjs Harvesting user's data, most likely...

There's nothing wrong with web-vitals...
Post reply on HN