deepdiff icon indicating copy to clipboard operation
deepdiff copied to clipboard

Rename diff result keys

Open Shaun-3adesign opened this issue 8 months ago • 1 comments
trafficstars

the output of a diff depending on the view look like the following

{'values_changed': [<root.status t1:"UP", t2:"DOWN">]}

{'values_changed': {'root.status': {'new_value': 'DOWN', 'old_value': 'UP'}}}

it would be great if it was possible to rename the keys for example

{'values_changed': [<root.status api:"UP", switch:"DOWN">]}

{'values_changed': {'root.status': {'switch': 'DOWN', 'api': 'UP'}}}

or better still have someway to I can create my own result

Shaun-3adesign avatar Mar 20 '25 21:03 Shaun-3adesign

Hi @Shaun-3adesign Interesting idea. It should be easy to add parameters to rename t1 and t2 to anything you want. PRs are very welcome too!

seperman avatar Mar 27 '25 02:03 seperman