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

2018-01-25 Thread Chris Lamb
Hi Mattia, > So this added a new build dependency, etc. > I've built the required backports, and uploaded them to DELAYED/10 so > that they will land to stretch-backports' NEW after they migrate to > testing Ooh, great thinking! Thanks :) Best wishes, -- ,''`. : :' : Chris

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

2018-01-25 Thread Mattia Rizzolo
On Thu, Jan 25, 2018 at 06:45:36AM +0530, Chris Lamb wrote: > > https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?id=1b121ea4efdb9fc614d32172b9749b5dd4afc550 So this added a new build dependency, etc. I've built the required backports, and uploaded them to DELAYED/10 so that

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

2018-01-24 Thread Chris Lamb
tags 888112 + pending thanks Fixed in Git: https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?id=1b121ea4efdb9fc614d32172b9749b5dd4afc550 Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-

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

2018-01-23 Thread Chris Lamb
Hi pabs, > That isn't going to work for UTF-8 JSON, I suggest using the MIME type > instead of the file type string. https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?id=f7ced27f52b974b8dac3354b3145637e3bc28f24 > I would suggest also checking for '[' characters (from JSON

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

2018-01-23 Thread Paul Wise
On Wed, 2018-01-24 at 06:47 +0530, Chris Lamb wrote: > https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?id=2a758d3d0205e934ed6dffebb5d6462b00fe590d That isn't going to work for UTF-8 JSON, I suggest using the MIME type instead of the file type string. $ curl -s

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

2018-01-23 Thread Paul Wise
On Wed, 2018-01-24 at 06:47 +0530, Chris Lamb wrote: > https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?id=2a758d3d0205e934ed6dffebb5d6462b00fe590d I would suggest also checking for '[' characters (from JSON arrays). -- bye, pabs https://wiki.debian.org/PaulWise

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

2018-01-23 Thread Chris Lamb
Hi Paul, > > 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. > > I think it would make diffoscope very slightly more useful if it could > fill in the gaps in

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

2018-01-23 Thread Paul Wise
On Wed, 2018-01-24 at 05:16 +0530, Chris Lamb wrote: > 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. I think it would make diffoscope very slightly more useful

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

2018-01-23 Thread Chris Lamb
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

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

2018-01-23 Thread Mattia Rizzolo
On Tue, Jan 23, 2018 at 09:41:18PM +0800, Paul Wise wrote: > The Python jsondiff module allows comparing JSON files in a better way > than just comparing the plain text like diffoscope currently does. Actually, that's a problem. Diffoscope has a json comparator, that works great, but it's failing

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

2018-01-23 Thread Paul Wise
Package: diffoscope Version: 90 Severity: wishlist The Python jsondiff module allows comparing JSON files in a better way than just comparing the plain text like diffoscope currently does. The jsondiff command-line program outputs only the JSON attributes that are different between the files,