5 ms·
The worst thing, to me, mentioned in "Bad" is that CSV's are untyped, which especially makes distinguishing nulls and empty strings impossible. I wonder if a "
by rattray 6y ago
The worst thing, to me, mentioned in "Bad" is that CSV's are untyped, which especially makes distinguishing nulls and empty strings impossible.
I wonder if a "typed csv" standard could emerge, like `.tscv` eg;
Name::String?,ID::String,Born::Date
Foo,0123,2020-01-01
\NULL,0124,2020-01-02
Still streamable, human-readable/editable (although not with excel et al til they are modified to open it), compact, simple.
Of course, would only be useful to actual Data People for a while, so would not have ubiquity.
- rattray 6y agoComing back to this, I think a tuple-oriented JSON convention, like suggested elsewhere in the comments, would make more sense given the target market.
- bobbylarrybobby 6y agoYes, something like { headers: [...], types: [...], data: [ [...], [...], ... ] }
- rattray 6y agoExactly. Could even add a doctype of some kind to indicate nothing follows the "data" key to help with streaming (though I'm not familiar with streaming json and this may not really help in practice).
- soul_grafitti 6y agoYou could look at it from the perspective that the only type is text. When you do this the responsibility for managing the data type rests with the parser and not the encoder.