josdejong / jsoneditor

A web-based tool to view, edit, format, and validate JSON
http://jsoneditoronline.org
Apache License 2.0
11.6k stars 2.04k forks source link

example for showing diff #1178

Open ArjunVachhani opened 3 years ago

ArjunVachhani commented 3 years ago

Could we have a up to date example for generating diff like we have at below url? https://jsoneditoronline.org/#right=local.boguma&left=local.raxige

I see there is one but it seems not exactly same as we have on above mentioned url.

BTW Very nice plugin, kudos

josdejong commented 3 years ago

The diffing solution on https://jsoneditoronline.org is implemented with some custom code on top of https://www.npmjs.com/package/diff-sequences, it's indeed very different from the basic example in https://github.com/josdejong/jsoneditor/blob/develop/examples/20_custom_css_style_for_nodes.html (I guess you're referring to that example).

The code of https://jsoneditoronline.org is not open source, though I could maybe extract the diffing code some day.

josdejong commented 3 years ago

BTW Very nice plugin, kudos

Thank you 👍

bonafe commented 2 years ago

The diffing solution on https://jsoneditoronline.org is implemented with some custom code on top of https://www.npmjs.com/package/diff-sequences, it's indeed very different from the basic example in https://github.com/josdejong/jsoneditor/blob/develop/examples/20_custom_css_style_for_nodes.html (I guess you're referring to that example).

The code of https://jsoneditoronline.org is not open source, though I could maybe extract the diffing code some day.

Where you able do extract the code? The difference functionality is very useful.

josdejong commented 2 years ago

Not yet, it's still somewhere on my todo list though.