4 ms·
Would be great to get a tool that could diff(erence) two JSON files, with the output being a grid of gray boxes, each gray box represents where a top level elem
by hadlock 4y ago
Would be great to get a tool that could diff(erence) two JSON files, with the output being a grid of gray boxes, each gray box represents where a top level element is the same between both, and yellow box represents some sub-level item inside the top level item is not the same between both, blue boxes represent where a new top level element is only present in the left side (added), and red represents only present in the right side (deleted)
You could visually diff a whole lot of reports, pretty much instantly. Our PM had a paid tool that could do this, but wasn't sure what it was.
- lionkor 4y agoThe JSON spec, of course, has a diff specified, and common json implementation can in fact diff json. You could then put that result back into a graph (since its also just json, in flattened form i believe), and youre done ;)
- return_to_monke 4y agoThis, of course, isn't exactly what you want, but what about difftastic?[0] It claims it supports JSON [1] [0] https://github.com/Wilfred/difftastic https://github.com/Wilfred/difftastic [1] https://difftastic.wilfred.me.uk/languages_supported.html https://difftastic.wilfred.me.uk/languages_supported.html
- theteapot 4y agoStable formatting the JSON (sorted keys, same indent) then using a graphical diff tool seems to work pretty well for me.
- throwawaybutwhy 4y agoPython's deepdiff [0] is your friend (more or less). [0] https://github.com/seperman/deepdiff https://github.com/seperman/deepdiff
- afiori 4y agoFar from perfect but I use a VSCode extension[0] to sort json object keys, then (if properly indented) normal diffing tools work slightly better Once I wrote a simple script to convert json files to `path : value\n` form; that is getting this ."a" : 1 ."b" : {} ."b"."a" : "" ."b"."c" : [] ."b"."c"[0] : true from the json { "a": 1, "b": { "a": "", "c": [true] } } It made better diffs but it was also harder to read. [0] https://marketplace.visualstudio.com/items?itemName=richie5um2.vscode-sort-json https://marketplace.visualstudio.com/items?itemName=richie5u...
- smdyc1 4y agoSadly I have to use BeyondCompare for this, but I'd love to know what your PM uses.
- deleted 4y ago[deleted]