Created
February 24, 2023 16:01
-
-
Save FlorianHeigl/b37f7fe32bc4def5c5935f7631e2c3a7 to your computer and use it in GitHub Desktop.
bios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
from deepdiff import DeepDiff | |
# Read the JSON files | |
with open("appcluster11.json") as file: | |
appcluster11 = json.load(file) | |
with open("appcluster12.json") as file: | |
appcluster12 = json.load(file) | |
# Compare the two JSON objects | |
diff = DeepDiff(appcluster11, appcluster12) | |
# Print the differences (excluding identical items) | |
for key in diff: | |
if key != "values_changed": | |
continue | |
for item in diff[key]: | |
print(item["path"], item["new_value"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment