josephburnett / jd

JSON diff and patch
MIT License
826 stars 38 forks source link

Document usage with `git diff` #38

Closed matschaffer closed 2 years ago

matschaffer commented 2 years ago

I was looking for a way to feed git diff through jd and didn't find anything in the readme.

Eventually I googled my way to https://stackoverflow.com/a/68012154/69002 which worked nicely.

Maybe we should add something to the jd docs about it? I'm sure it's a common case that people want a structural diff of git-controlled json.

In my case I wanted it to confirm there were no structural changes after a reformat operation. Guessing others might want to do the same.

josephburnett commented 2 years ago

Great idea! Added it to the new cookbook: https://github.com/josephburnett/jd/blob/master/README.md#cookbook