Json stringify of any object extending EntityBase will mute and remove the CreationDate attribute
Closed this issue · 1 comments
fredleroy commented
Hi,
We sometimes log entities returned by the sdk. Our logger (winston) stringifies those entities.
In the toJSON method of the EntityBase in the sdk, there is a mutating instruction removing CreationDate:
This is quite annoying to us.
I believe there are good reasons for having this specific toJSON override and stripping the creationDate property (even though we would enjoy having this information in the logs) but what is really challenging for us is that the toJSON mutates the logged object.
If you really need to keep this overridden serializer, do you think there could be a possibility to clone the object serialized before removing any field to it ?
Regards,
fredericdelordm commented
Close and merged with #355