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

Can't ungron strings containing both escapes and semi-colons #7

Closed
ConradIrwin opened this issue Aug 2, 2016 · 4 comments
Closed

Comments

@ConradIrwin
Copy link

I was playing around with your tool on the output of gmail json, gron works fine, but I get an error "cannot parse input" if I try and pipe it back into ungron.

Narrowing it down, the problem seems to be reproducible with this example:

$ echo 'json.payload.headers[4].value = "from o1.email.codeship.io (o1.email.codeship.io. [192.254.119.116])        by mx.google.com with ESMTPS id d79si3761733ioj.86.2015.10.09.12.02.54        for \[email protected]\u003e        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);        Fri, 09 Oct 2015 12:02:54 -0700 (PDT)";' | gron -u
Fatal (failed to parse input statements)

A little bit of digging reveals a minimal test case:

echo 'json.value = "\u003c ;"' | ./gron -u

It seems to be a combination of the character escape and the semi-colon in the string.

Let me know if I can be more helpful.

@tomnomnom
Copy link
Owner

Good spot! Thanks for the report. New version is incoming :)

@tomnomnom
Copy link
Owner

@ConradIrwin can you try v0.2.5 and confirm that fixes your problem?

https://github.com/tomnomnom/gron/releases/tag/v0.2.5

@tomnomnom
Copy link
Owner

Actually, I was a tad too hasty and I've introduced another problem as a result. Sorry about this!

@tomnomnom tomnomnom reopened this Aug 2, 2016
@tomnomnom
Copy link
Owner

@ConradIrwin right! Let's try this again 😆

0.2.7 should fix it - but without introducing a regression this time!

https://github.com/tomnomnom/gron/releases/tag/v0.2.7

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

No branches or pull requests

2 participants