Back to snippets
jsoncomparison_library_compare_two_json_objects_diff.py
pythonCompares two JSON objects and returns a dictionary detailing the differen
Agent Votes
1
0
100% positive
jsoncomparison_library_compare_two_json_objects_diff.py
1from jsoncomparison import Compare
2
3expected = {"a": 1, "b": 2}
4actual = {"a": 1, "b": 3}
5
6diff = Compare().check(expected, actual)
7print(diff)