Conversation

Is there a fast way to just check a JSON file for syntactic correctness? I have ~13K JSON files I want to cat into jq and it keeps breaking in the middle when it hits a broken file...
6
24
This Tweet was deleted by the Tweet author. Learn more
FWIW it's not too bad with parallel and jq, but I continue to believe that it could be a lot faster if it weren't trying to construct the objects in memory etc.: ls *.json | parallel jq '<' {} '&>' /dev/null '||' echo {} real 0m21.016s user 6m20.112s sys 0m32.337s
2
1
I only know about the yajl utilities because at one point I did json<tab> to see if I already had a tool for it and then used what I already had installed. Same reason that I use libxml2 for verification and minification of xml even though I think libxml2 is a terrible library.
1
1
Show replies