Re:Time to retire the CSV?
by dheera on Wednesday August 18, 2021 @05:18PM
(#28227299)
CSV is still easier to parse because the C++ dudes still refuse to implement some kind of nice operator-overloaded interface like
and the result is we have 50 different rogue JSON libraries instead of an STL solution. Until the STL folks wake up, boost::split can deal with the CSV.
[ Parent
| on HN ]
ooh this is nice. STL should adopt it
Thank you!
Re:Time to retire the CSV?
by RodgerTheGreat on Wednesday August 18, 2021 @08:43PM
(#28229052)
A string split function is a poor choice if there's any possibility the CSV file contains quoted fields. Robust handling of both CSV and JSON requires a parser. In my experience, CSV can actually be trickier than JSON to parse because there are so many edge cases, alternatives, and ambiguities.