-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Strings deserialized as BigInts #98
Comments
@insulationman, indeed, that's an unexpected side effect of the recent changes when I introduced the custom serialiser to support the I'm going to need to make it smarter, let me outline the challenges:
There are multiple strategies how to deal with that:
I'll probably go with the second option, as it'll be useful also for other cases. But this will take a bit time. So, as a quick fix, you could use the JSONSerialiser to serialise the payload; if that's urgent, I could also try to provide the fix that changes the default serialisation behaviour, not to (de)serialise version as a string. @insulationman thoughts? Also, as I have you here, could you share a bit more about your setup? I'd be happy to get more information on another possible alignment to use Pongo for you. Thank you in advance! |
Sounds good! For now i will just validate for number only strings, as the application is simple. I'm building an mvp for niche service that relates to file uploads and processing. I like the event sourcing methodology so i started using Emmet with Pongo. Fits like a glove. This is my first serious express/ts backend so I'm learning a lot. |
Strings are interpreted as BigInts if they contain only numbers. This happens when i get data from a collection of projections using findOne.
An error is then thrown when i send these objects in an api response, since BigInts are not properly serialized.
The text was updated successfully, but these errors were encountered: