Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a custom serializer #2811

Closed
johnnyasantoss opened this issue Oct 9, 2024 · 2 comments
Closed

Add a custom serializer #2811

johnnyasantoss opened this issue Oct 9, 2024 · 2 comments

Comments

@johnnyasantoss
Copy link

Is your feature request related to a problem? Please describe.
When working with BigInt or any other JS Type that isn't natively supported on JSON (or JSON.stringify) we have no good solution other than manually transform string serialized values back to their original format/type.

Maybe related #2771

Describe the solution you'd like
Have a global hook bullmq.serialize = async (data) => ... that is overridable by the user.

Describe alternatives you've considered
Manually converting back properties one by one - tedious and error prone

@godinja
Copy link

godinja commented Oct 11, 2024

Some additional context here #2591

@johnnyasantoss
Copy link
Author

Thank you @godinja. This is probably a dupe of #14 but highlights our need of supporting bigints which is not supported by json (not directly at least)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants