zgrossbart / jdd

A semantic JSON compare tool
http://www.jsondiff.com
Apache License 2.0
1.05k stars 183 forks source link

Maintain all object differences in same level #46

Closed krishnaraman001 closed 2 years ago

krishnaraman001 commented 2 years ago

Can we compare objects on both sides within same level like below image image Is it possible to do like that by doing some changes?

If objects are of different sizes, then heights of JSONS will be different and while rendering u can see like image

krishnaraman001 commented 2 years ago

HI @zgrossbart this is really an awesome tool. we are using for comparison which really helps a lot.

My requirement is to maintain all the differences in same level on both sides similar to visual studio code, so it will be very easy the data easily with out scrolling up and down if JSONS are of different length.

is it possible to do that by doing changes in the code?

zgrossbart commented 2 years ago

Hello @krishnaraman001. I tried that style of diff when I was first creating the tool. It worked well when comparing two JSON documents that were short and almost the same content, but it didn't scale very well. When the JSON documents were either very long or very different the results were difficult to read.

It would be possible to do this kind of view with a code change, but the code change would be very large.

krishnaraman001 commented 2 years ago

Hi @zgrossbart Thank you so much for the response.

I need that requirement for our application. we are trying to integrate this JDD application. If possible can i have those code changes that you have done initially. currently i am extending your application based on our usage. we always has similar kind of content with similar keys on both sides. please help me how to do fulfil that requirement i am looking for.

Thank you :)

zgrossbart commented 2 years ago

Hello @krishnaraman001,

I'm sorry, but my original code changes were very preliminary and wouldn't be useful with the current JSONDiff code base. What you're looking for would need to be a separate project.