This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[✨] Custom Class serialization #87
Labels
[STAGE-2] incomplete implementation
Remove this label when implementation is complete
[STAGE-2] not fully covered by tests yet
Remove this label when tests are verified to cover the implementation
[STAGE-2] unresolved discussions left
Remove this label when all critical discussions are resolved on the issue
[STAGE-3] docs changes not added yet
Remove this label when the necessary documentation for the feature / change is added
[STAGE-3] missing 2 reviews for RFC PRs
Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Is your feature request related to a problem?
I'm using MongoDB and every request contains one or more
ObjectId
class object which can not be serialized.And I'm lazy to write a bunch of
.map
s and.toString()
s to convert those fields to string manually.Describe the solution you'd like
Write a bunch of
.map
s and.toString()
s after every request is too terrible for me.I'm looking for those solutions
ObjectId
inmongodb
(or inbson
) just likeURL
andDate
. (ideal but a waste for non-mongodb user)toString()
orqSerialize()
function automatically. (however, usingtoString()
converts any class object intostring
, which requires additional type transform inuseLoader()
anduseAction
, etc.)Describe alternatives you've considered
n/a
Additional context
No response
The text was updated successfully, but these errors were encountered: