You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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,
The text was updated successfully, but these errors were encountered:
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:
mangopay2-nodejs-sdk/lib/models/EntityBase.js
Line 47 in c65e6db
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,
The text was updated successfully, but these errors were encountered: