-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
querystring.stringify does not support BigInt #36080
Comments
Add support for bigint in strgify for querystring method. This use the same method as the number but escapes the exponential notation method as bigint does not play well with the numbers. Instead in case of stringification there is a separate condition clause to filter out bigint. Fixes: nodejs#36080
@kennytm what will be the use case of sending such large numbers in bigint form, ideally one will prefer to use string for such cases instead of bigint. Also when the parsing is applied what should be the value of the key, should it be |
@yashLadha There is a server producing JSON containing numbers recently upgraded to include 64-bit IDs. (The server is not written in JS and they have a well-defined schema so there is no problem handling 64-bit integers in JSON or query). So we used Yes we know we can
|
Is your feature request related to a problem? Please describe.
it should print
a=12345678901234567
Describe the solution you'd like
support
bigint
in additional tostring
,number
andboolean
.i.e., in
stringifyPrimitive
encode any value wheretypeof v == 'bigint'
as'' + v
, the same as'number'
.Describe alternatives you've considered
No.
The text was updated successfully, but these errors were encountered: