Skip to content

Allow collapsing json output and fix bug with quotes within a value#20

Open
ahsquared wants to merge 3 commits intoFlatFilers:masterfrom
ahsquared:master
Open

Allow collapsing json output and fix bug with quotes within a value#20
ahsquared wants to merge 3 commits intoFlatFilers:masterfrom
ahsquared:master

Conversation

@ahsquared
Copy link

Hi Martin,

Awesome tool! Love it! Had a bug though when I had quotes within a value, e.g. in the following csv data:
foo bar "baz" more foo

the json output would be:
[
{
"foo": "bar "baz" // missing quote here
},
{
"foo": "more foo"
}
]

I removed the trim('"') on the value and tested with lots of inputs and it seems to work. You may have had a good reason for this - would like to know - but for my use cases this works.

I also needed collapsed output, so added an option for that, that just uses JSON.stringify(json).

Cheers,
Andre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant