Unfortunately, your data doesn't conform to any *well established* CSV
conventions. It definitely doesn't follow "Excel-flavored" CSV. How
did your data get generated in the first place?

After opening and loading the CSV file, the results are as follows (I will list each field on its own row for read-ability:
Bill Ding
123 Mockingbird Lane
Some City

I'm kind of impressed. Except for stripping ALL the quotes in the
JSON, that actually worked pretty well. Lots of other parsers would
have choked on the various unescaped quotes and commas within the JSON
and wound up with more than 6 fields.

In your place, with the data that you gave, I would write a custom
parser (instead of relying on any ready-made CSV package) that counts
on the first 5 fields being "simple" and the rest being a single field
which contains JSON.

John Y.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].