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

Alternative json diff notation #1

Open
wader opened this issue Dec 12, 2022 · 2 comments
Open

Alternative json diff notation #1

wader opened this issue Dec 12, 2022 · 2 comments

Comments

@wader
Copy link

wader commented Dec 12, 2022

Hey, was poking around in your various jq repos for inspiration. Nice to find someone else have thought about how to represent diffs between json values as json, might steal this notation for use with some fq snippet.

Also maybe this code can be interesting? https://github.com/wader/fq/blob/6279cda7bca7e31cc2da772ce235b85ff5289dae/pkg/interp/funcs.jq#L120-L143 with some effort it can probably be used to output "path"-diffs also if your looking for a pure jq-version.

@tst2005
Copy link
Member

tst2005 commented Dec 13, 2022

Thanks for your feedback!
Oh, I did not worked on my jsondiff for a while !
Each time I tried to convert to a jq-only solution ... I had performance issues that forced me to revert to use the diff command.
Note: I only got performance issue on big dataset (that exists at my work).

If I can get free time, I will consider your code ! ;-)

@wader
Copy link
Author

wader commented Dec 13, 2022

Aha yes, i have no idea how performant my version is, so could be problem.

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