Open monperrus opened 2 years ago
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!
Ack, thanks @jrfaller
FTR, we look into https://github.com/gnieh/diffson by @satabin
cc/ @algomaster99 @khaes-kth FYI
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!
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.
Hi @jrfaller
how to diff JSON files with Gumtree?
Thanks,