Bug#888112: diffoscope: compare JSON files using Python jsondiff module

Chris Lamb lamby at debian.org
Tue Jan 23 23:46:35 UTC 2018


Hi Mattia & Paul,

> FTR, it seems the only check used to decide whether a file is a json
> file, is to look for a '.json' as a filename suffix (and I'm not sure we
> can do much better without looking into the file, which is probably too
> expensive a check).

I wonder how sensible it would be to, say, slurp the first 100 bytes and see
whether we start with a "{" (or some other heuristic) and, if so, try and
parse the file as JSON etc.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-



More information about the Reproducible-builds mailing list