jlevy / the-art-of-command-line

Master the command line, in one page
153.12k stars 14.55k forks source link

JSON diffing, prettydiff, and similar tools #515

Open jlevy opened 7 years ago

jlevy commented 7 years ago

http://prettydiff.com/ is avery useful concept and integrated in a few places like Atom. It is a bit clumsy to use/set up from command line so we'd need some illustration or note. Or are there better alternatives?

Others: https://github.com/andreyvit/json-diff

And how about this? (which actually works pretty well — see also #516 with less -R.

diff <(jq --sort-keys . < "$file1") <(jq --sort-keys . < "$file2") | colordiff
heitorPB commented 5 years ago

I use jq for json stuff