Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If an environment diff looks like json, use a json differ like jd #52

Open
blaggacao opened this issue Jan 6, 2022 · 3 comments
Open

Comments

@blaggacao
Copy link

Sometimes a environment diff is actual plain json, diffed on one big single row.
As a result an entire screen is coloured red/green without really helpful semantics.
Even the --character-oriented is not really of great help at times (when the diff is a little bigger).

It might be possible to use something like https://github.com/josephburnett/jd to make the result more intelligible.

Since these tools are no haskell, a good way would be to optionally write files with old/new environments to disk, it then becomes trivial to do the semantic diffing by hand.

@blaggacao
Copy link
Author

I was able to copy chunks manually together from the output, but that's rather brittle.

@Gabriella439
Copy link
Owner

Yeah, we run into this same issue at work, too where the diff fares poorly on large JSON files. The tool can probably auto-detect JSON and use a more intelligent diff for that case

@blaggacao
Copy link
Author

A colleague just hinted me at https://github.com/jeffkaufman/icdiff -- which I happily forward really just for general knowledge & inspiration in the context of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants