I’ve got the following text in a description field in my raw JSON file, where the double quotes are obviously escaped. How can I change settings in the JSON formatter and/or the CSV parser/formatter to fix this problem? The snaps are at their default settings.
“Charts the development of Black Art in the United States and Great Britain from 1945 to the present through Paul Gilroy’s notion of the \“Black Atlantic\” – the ways that a distinct aesthetic emerged from a fusion of West African, American, and British traditions. Also listed as ART 294.”,
But when output to csv, it looks like this:
colA: Charts the development of Black Art in the United States and Great Britain from 1945 to the present through Paul Gilroy’s notion of the \Black Atlantic\" – the ways that a distinct aesthetic emerged from a fusion of West African
colC: and British traditions. Also listed as ART 294."
So, it appears that the commas in the text are causing it to split into multiple columns and the escaped double quotes don’t end up as just double quotes. In other words, the default setting of '' in the CSV formatter doesn’t appear to be working to resolve text fields like the one above.
I found this on a site, which states that if a backslash is immediately followed by a double quote (\") that the csvformat function won’t work: [CSV-200] CSVFormat cannot read its own output if input contain escape character followed by quote character - ASF JIRA. Not sure if this is the same function that your csv formatter snap is using?
The recommendation on the site above was to remove either the " or the \ and I removed the \ and it fixed my text problem!