jschema-to-python
jschema-to-python copied to clipboard
Why deepcopy __dict__ to serialize to json?
The deepcopy of the instance __dict__
during serialization at the following line seems unnecessary: https://github.com/microsoft/jschema-to-python/blob/c4fb418bd537fd78c52f1a193219fff6bf8af980/jschema_to_python/to_json.py#L26
I have benchmarked this and it is also a serious bottleneck when serializing large objects. Is there a reason behind creating a deep copy here instead of a shallow copy?