tomnomnom / gron

Make JSON greppable!
MIT License
13.73k stars 325 forks source link

Inconsistency in ungron for invalid inputs #87

Open xonixx opened 3 years ago

xonixx commented 3 years ago

Hi!

This works (note conflicting field "a"):

$ printf 'json.a="STR";\njson.a=1;\n' | gron -u
{
  "a": 1
}

this no:

$ printf 'json.a=1;\njson.a="STR";\n' | gron -u
failed to merge statements: unexpected data type for merge

I would assume the two should give same result.

$ gron --version
gron version 0.6.1
adamritter commented 1 year ago

Works in https://github.com/adamritter/fastgron