Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to find which json file the diff is coming from #362

Open
smitapaloalto opened this issue Feb 23, 2024 · 0 comments
Open

how to find which json file the diff is coming from #362

smitapaloalto opened this issue Feb 23, 2024 · 0 comments

Comments

@smitapaloalto
Copy link

smitapaloalto commented Feb 23, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant