Print the added values
yargolan opened this issue · 4 comments
Is your feature request related to a problem? Please describe.
When running the deepdiff vs JSON files and it find that a new key was added.
Describe the solution you'd like
It would be great if I could print the new value added, not just the key name, like in modified keys
Describe alternatives you've considered
The only option I have is to look for that added key in the original JSON file
Thanks
Maybe you can try the extract function?
@yargolan Are you using the DeepDiff commandline tool? Have you tried setting the verbose_level to 2? You can see some examples with verbose_level here: https://zepworks.com/deepdiff/current/basics.html
@yargolan It is supposed to return the value with verbose_level=2:
t1 = {1: 1, 3: 3, 4: 4}
t2 = {1: 1, 3: 3, 5: 5, 6: 6}
ddiff = DeepDiff(t1, t2, verbose_level=2)
result = {
'dictionary_item_removed': {
'root[4]': 4
},
'dictionary_item_added': {
'root[6]': 6,
'root[5]': 5
}
}
If it is not, please re-open this ticket with reproducible code so I can debug it.