deepdiff
deepdiff copied to clipboard
Handling of renames
For my migration system, one of the more often applied use cases is a rename of a dictionary key (which in jsonschema often is the name of an object's field), so what i get from that is:
{
"dictionary_item_removed": {"root['properties']['obatzter']": {"description": "Custom user notes", "type": "string", "format": "html", "title": "User notes"}},
"dictionary_item_added": {"root['properties']['apfelsalat']": {"description": "Custom user notes", "type": "string", "format": "html", "title": "User notes"}}
}
Where the fieldname "obatzter" was renamed to "apfelsalat". The above syntax is not so nice for migration, so I'd love to rather get a diff that says:
{
"dictionary_item_renamed": {"root['properties']['obatzter']": "root['properties']['apfelsalat']"}
}
Might that please be possible?
Hi @ri0t That is an interesting idea. Yes it should be doable. Let me think about how to implement it.