zgrossbart / jdd

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

Add ghost placeholders for missing properties #27

Open fmalina opened 5 years ago

fmalina commented 5 years ago

List on the right shows textual information about missing properties in one column or another.

It would be better if this data was used to put ghost placeholders of the same height as the information present where the information is missing. Textual warnings would then not be needed.

This would aid comparison as equal and equivalent information would end up side by side. Diffmerge is an example of a comparison tool that does this well.

zgrossbart commented 5 years ago

Thank you for the feature request, but I'm not sure what you mean. Any chance you have a screenshot or a drawing that shows what you're looking for here?

fmalina commented 5 years ago
ghost placeholder
fmalina commented 5 years ago

Empty lines are inserted in place of missing information on either side to vertically align matching information for easier comparison.

zgrossbart commented 5 years ago

I've been looking into this and I'm having two design issues. The first is that we would still need the callouts on the right explaining what the difference was. Just have the space doesn't explain why they are different.

The second issue is that a missing property could represent an object that was very long. That could cause a ghost line that was pages long.

There are also some other edge cases here like missing array properties. If there was an array with 100 properties on the left side and one property on the right side it wouldn't be useful to show 99 empty lines.

fmalina commented 5 years ago

Sounds reasonable. These ghost lines need a good background pattern.

fmalina commented 4 years ago

I've just recently returned to jsondiff recommending it to a colleague, but thinking about the worries you mentioned I am not finding them as relevant, never been an issue for me while using diffmerge. I don't have the code to make this happen ATM, so I'll shush now