Would love support for UUID data type. Current situation:
import pprint
import uuid
from deepdiff import DeepDiff
t1 = {"id": uuid.uuid4()}
t2 = {"id": uuid.uuid4()}
result = DeepDiff(t1, t2)
pprint.pprint(result)
{'values_changed': {"root['id'].int": {'new_value': 117850254076634266241219085205683222228,
'old_value': 91358784609380289177662098655200634313}}}
This causes problems for me since an unexpected int is appended to path, and dumping result as json will crash due to Integer exceeds 64-bit range. Would be great if result could rather be something like:
{'values_changed': {"root['id']": {'new_value': UUID(...),
'old_value': UUID(...)}}}
I've added exclude_types={UUID} to work around my problems for now.
Docs mentions support for custom objects, but I didn't find any examples
Supported data types
int, string, unicode, dictionary, list, tuple, set, frozenset, OrderedDict, NamedTuple, Numpy, custom objects and more!
Would love support for UUID data type. Current situation:
This causes problems for me since an unexpected
intis appended to path, and dumping result as json will crash due toInteger exceeds 64-bit range. Would be great if result could rather be something like:I've added
exclude_types={UUID}to work around my problems for now.Docs mentions support for custom objects, but I didn't find any examples