jdd icon indicating copy to clipboard operation
jdd copied to clipboard

Allow to save a report of the differences encountered

Open vieirandre opened this issue 6 years ago • 12 comments

Feature request. Self-explaining title.

Anyhow, congrats for the tool, @zgrossbart.

vieirandre avatar May 25 '18 18:05 vieirandre

Thanks for using JSONDiff. What would this report look like? What format would you want to save?

zgrossbart avatar May 25 '18 18:05 zgrossbart

For starters, I thought in a .pdf where you'd have the stats of differences at the top and the json below showing the inequalities inline.

vieirandre avatar May 26 '18 00:05 vieirandre

Thank you for the report. I could develop a print CSS that would allow you to do that. Then you could use the browser to print to CSS. The problem is that the differences would nee to be dynamic and I'm not sure how to make that work in a PDF. Let me think about this some more, but this is a lower priority feature.

zgrossbart avatar May 26 '18 00:05 zgrossbart

Just so we can get on the same page: what do you mean by “differences would need to be dynamic”?

I was thinking in the differences being displayed like Git's diff. That would be static.

vieirandre avatar May 26 '18 01:05 vieirandre

The diff from JSONDiff is different than a diff from Git. JSONDiff will show multiple differences on the same line and the information you will will change as you iterate through your list of differences.

zgrossbart avatar May 26 '18 01:05 zgrossbart

Hello, can we store the output in a pdf or JSON file? We want to take this difference and create a list for the customers to check what has changed in our jsons in different releases.

smitapaloalto avatar Jan 31 '24 05:01 smitapaloalto

@smitapaloalto, generating a PDF file from a browser is a bit tricky. However, you can print to PDF and get a list of the differences between the two files. Right now the formatting on that PDF really isn't great, but I could develop a print CSS that would make it better. Would that give you the functionality you're looking for?

You can also take a look at our readme to see how you can create an URL where you can automatically load files to compare.

zgrossbart avatar Jan 31 '24 11:01 zgrossbart