News for hackers. Stuff that matters.
Re:Time to retire the CSV? by jerf on Wednesday August 18, 2021 @03:49PM (#28226229)
That is not quite a CSV replacement. I use it for things with objects and stuff all the time. To be a CSV replacement you really need to add that each line must be a JSON array, and that it can only have scalars in it (no sub-arrays or objects). That would be a decent enough replacement for CSV itself. Not perfect, but the CSV "standard" is already a nightmare at the edge anyhow and honestly a lot of it can't be fixed anyway, so, this is probably as good as it could get.
Re:Time to retire the CSV? by derefr on Wednesday August 18, 2021 @06:52PM (#28228148)
> that it can only have scalars in it (no sub-arrays or objects)

I see CSV files that contain JSON arrays/objects in their fields all the time. Mainly from exporting Postgres tables that contain json/jsonb-typed columns. Are you saying that these aren't valid CSVs?

Re:Time to retire the CSV? by zerocrates on Thursday August 19, 2021 @12:01AM (#28230195)
They're saying that a CSV equivalent should be strictly 2-dimensional, with "flat" values.

Such a format could contain arbitrary JSON in a "cell", but simply as text, in the same way as putting the same data in a CSV.

Re:Time to retire the CSV? by shaftoe on Thursday August 19, 2021 @07:20AM (#28232499)
These are strings containing JSON