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

how to diff JSON files with Gumtree? #273

Open
monperrus opened this issue Mar 10, 2022 · 4 comments
Open

how to diff JSON files with Gumtree? #273

monperrus opened this issue Mar 10, 2022 · 4 comments
Assignees
Labels

Comments

@monperrus
Copy link
Contributor

Hi @jrfaller

how to diff JSON files with Gumtree?

Thanks,

@jrfaller
Copy link
Member

Hi @monperrus,

Currently it's not possible.

We have a JSON differ compliant with the RFC Json patch here : https://github.com/caohanyang/json_diff_rfc6902 (beware it's not maintained anymore).

Also there is a tree sitter grammar (https://github.com/tree-sitter/tree-sitter-json) that could be integrated easily into GumTree.

Cheers!

@monperrus
Copy link
Contributor Author

Ack, thanks @jrfaller

FTR, we look into https://github.com/gnieh/diffson by @satabin

cc/ @algomaster99 @khaes-kth FYI

@jrfaller
Copy link
Member

OK don't hesitate to tell me how it works with diffson, AFAIK it seems to be using sequence algorithms (LCS, Patience)?

FYI we have a small benchmark in our publication on the subject: https://hal.archives-ouvertes.fr/hal-01433078/document

Cheers!

@satabin
Copy link

satabin commented Mar 10, 2022

Hi @jrfaller, it does use LCS based diff for arrays, and does not generate patches with move action. I was investigating other algorithms a while ago but haven’t looked into it for a while. I will have a look at JDR, it sounds interesting.

@jrfaller jrfaller self-assigned this Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants