itchyny / gojq

Pure Go implementation of jq
MIT License
3.3k stars 119 forks source link

error-handling discrepancy when reading mal-formed JSON #264

Open pkoppstein opened 2 months ago

pkoppstein commented 2 months ago

try/catch work as expected with jq and jaq, but gojq has trouble with `"\u263"':

for jq in jq jaq gojq ; do 
  echo jq=$jq
  (echo '"a\u263"'; echo '"def"' ) | $jq -nr 'recurse( try inputs catch .) | select(.) | length'
done
jq=jq
41
3
jq=jaq
28
3
jq=gojq
105