Skip to content

Add diff command. #27

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add diff command. #27

wants to merge 1 commit into from

Conversation

BigBlueHat
Copy link
Contributor

Expands two JSON-LD files and compares the expanded results.

This can be extremely useful when moving to a new context file that uses (some or all of) the same term definitions as the previous context file.

This introduces a dependency on deep-comparer which is ISC licensed.

Expands two JSON-LD files and compares the expanded results.

This can be extremely useful when moving to a new context file
that uses (some or all of) the same term definitions as the
previous context file.
@BigBlueHat BigBlueHat requested a review from davidlehn February 8, 2024 21:31
@vorburger
Copy link

@BigBlueHat @davidlehn @msporny any chance you would consider merging this? I would use it on enola-dev/enola#779! 😺

@davidlehn
Copy link
Member

I had forgotten about this. Is it a good idea to add such things in the tool itself? It's a fairly specific diff. You can get the same effect with a "simple" command:

npx json-diff <(jsonld-cli expand file1) <(jsonld-cli expand file2)

Which seems more flexible since you can control the diff program, diff options, json-ld algorithms and options, filtering through jq, sorting n-quads, etc. Seems like a classic tradeoff of kitchen sink tools vs unix philosophy.

@vorburger
Copy link

@davidlehn whether or not you accept this PR is your call! 😄

But if you do not, perhaps its clearest if you simply close this PR, as "thanks, but no thanks"?

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

Successfully merging this pull request may close these issues.

3 participants