zgrossbart / jdd

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

Allow to save a report of the differences encountered #17

Open vieirandre opened 6 years ago

vieirandre commented 6 years ago

Feature request. Self-explaining title.

Anyhow, congrats for the tool, @zgrossbart.

zgrossbart commented 6 years ago

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

vieirandre commented 6 years ago

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.

zgrossbart commented 6 years ago

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.

vieirandre commented 6 years ago

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.

zgrossbart commented 6 years ago

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.

smitapaloalto commented 7 months ago

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.

zgrossbart commented 7 months ago

@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.