jsondiffpatch icon indicating copy to clipboard operation
jsondiffpatch copied to clipboard

how to find which json file the diff is coming from

Open smitapaloalto opened this issue 4 months ago • 0 comments

Hi,

I am calling 'jsondiffpatch json1.json json2.json' as a subprocess and storing the output with my Python script.

I am required to create a changelog using the diff file. How can I find out if it's an item added or removed and also which file has this change? Currently, the diff file shows the changes, I need to find where the diff is from, i.e if it is removed or added item from json1 or json2. Please guide me further.

Also, can you tell me how to create a readable JSON file with the subprocess output of this command?

Ex:

Json1 {.
a: 20 }

Json2 { a: 25 b :30 }

diff file shows a: 20 =>25 I am looking for a solution that shows-

json1(20) => json2(25) Json2(added 30)

smitapaloalto avatar Feb 23 '24 05:02 smitapaloalto