Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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