deep-diff is a javascript/node.js module providing utility functions for determining the structural differences between objects and includes some utilities for applying differences across objects.
Questions tagged [deep-diff]
31 questions
1
vote
1 answer
DeepDiff ignore with regex
I have two objects:
d1 = [ { "id": 3, "name": "test", "components": [ { "id": 1, "name": "test" }, { "id": 2, "name": "test2" } ] } ]
d2 = [ { "id": 4, "name": "test", "components": [ { "id": 2, "name": "test" }, { "id": 3, "name": "test"2 } ] }…

Gilbert Williams
- 970
- 2
- 10
- 24
1
vote
0 answers
Json serializing and deserializing
I am comparing two nested dictionaries using deepdiff package in python. I want to store it in a file but it's giving me an error
'prettyordered set is not json serializable'
I tried it converting using 'to_dict', same error. I also tried to…

Anuj Aggarwal
- 33
- 6
1
vote
4 answers
How to find object value from property path in Javascript object
I explain the problem with sample.
For example i have javascript object. It looks like:
var trial= { points:[{x:1,y:2},{x:5,y:2},{x:3,y:4}] , obj:{id:5,name:"MyName"} }
I use deep diff module to find difference between two json array. Then it find…

Nitterun A.
- 133
- 1
- 8
1
vote
0 answers
javascript object differences with deleted row
There are many excellent SO & npm solutions for object differences, but I was unable to find one that dealt successfully with a deleted row. The solutions I found would show a deleted row by showing all the following(subsequent) array elements…

edwardsmarkf
- 1,387
- 2
- 16
- 31
0
votes
0 answers
Deepdiff - Iterable_compare_func not working properly
I am facing recently an issue regarding the compare function 'iterable_compare_func'. Basically deepdiff return a wrong diff.
I test with exactly the same two lists described in the documentation and the result is not the same.
from deepdiff import…

brxdeop
- 1
0
votes
0 answers
Deepdiff not ignoring order when passing ignore_order
I have two dictionaries:
#1
{"reg2/image2:0.1": {
"binaries": {
"/bin/xyz": {
"components": [
"d",
"aa",
"new",
"git.example.com/wayform-chassis/xyzserver-v0.25.3"
],
"md5": "8bf54c95f9"
}
},
"loose_packages":…

DarkSand
- 13
- 5
0
votes
0 answers
How to exclude string from deepdiff comparison if matches regex expression
Basically what I am trying to do is: if any value has the same root name, but different superscripts (ex: goodbyeᵃᵃᵃ vs goodbyeᵇᵇᵇ) then this should not be included as a difference.
Here is my code so far:
old_data = [{"test1": "hello", "test2":…

Jim
- 23
- 5
0
votes
0 answers
YAML comparison using deepdiff - exclude_paths formatting not working
We are using DeepDiff for comparing two YAML files and then wanted to exclude certain paths for comparison
File1 dataset
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp1
labels:
app: myapp
env: prod
customer: A
File2…

diaryfolio
- 605
- 10
- 24
0
votes
1 answer
Add DeepDiff output back to original df
I apologize if this is a possible duplicate and a trivial question. I am trying to calculate the difference between diff column in my df for consecutive rows.
Here is my code for the same:
z = prac_df.sort_values(['customer_id',…

Irene Hawkins
- 51
- 10
0
votes
1 answer
How to get deep difference 2 object
I have a object like below. I can find difference with 'curtain' if i change quantity of it. But in this case it's not working 'sofa' with my function. I want my result will is have all properties of element have property change
obj1 = {
sofa: [
…
0
votes
1 answer
How to use DeepDiff with custom_operators and iterable_compare_func altogether?
I have to use DeepDiff to compare two lists of dictionaries with metrics of some variables. The comparison should be done in such a way that if the new metrics are equal to or greater than the previous ones, no difference between the dictionaries…

ericgcc
- 1
- 3
0
votes
1 answer
DeepDiff exclude_paths regex not filtering out paths
I have two dictionaries I'd like to compare using DeepDiff, excluding the "a" key in the "items" list:
d1 = {"items": [{"a": 1, "b": 2}, {"a": 1, "b": 2}]}
d2 = {"items": [{"a": 10, "b": 2}, {"a": 100, "b": 2}]}
exclude_paths =…

Johnny Metz
- 5,977
- 18
- 82
- 146
0
votes
1 answer
Extract values from deepdiff output?
I have compared two json file with deepdiff lib. But can figure Out the output.
My output -
{'values_changed': {'root': {'new_value': '{\n "quiz": {\n "sport": {\n "q1": {\n "question": "Which one is correct team name in NBA?",\n "options": [\n…

Nishant Raghuvanshi
- 9
- 1
- 5
-1
votes
1 answer
Compare 2 json files, apply that changes to another system
I have 2 json files. "original.json" and "changed.json", and also have 2 systems and each systems have "original.json". In my other codes, if user modify json file, then will save changed json files as "changed.json". So, I want compare…
-1
votes
1 answer
How to solve the Error related to Python Libraries on no module?
I am using Python lib deepdiff.
I Installed using cmd -> python -m pip install --trusted-host https://pypi.python.org deepdiff as I got an error with SSL I used above to cmd. When I worked in pycharm using python version35 and executed my file.
…

dow
- 159
- 5
- 15