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
Send a POST request with a JSON body containing a bigint-like string:
I'm using AdonisJS v6, and when I send a BigInt value like 692435250318209300 in the request body, Adonis automatically parses it as a JavaScript Number. This causes rounding and loss of precision.
Instead, I want AdonisJS to treat large numeric values as strings to avoid this issue.
Is there a recommended way to configure this behavior in AdonisJS?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Send a POST request with a JSON body containing a bigint-like string:
I'm using AdonisJS v6, and when I send a BigInt value like 692435250318209300 in the request body, Adonis automatically parses it as a JavaScript Number. This causes rounding and loss of precision.
Instead, I want AdonisJS to treat large numeric values as strings to avoid this issue.
Is there a recommended way to configure this behavior in AdonisJS?
Beta Was this translation helpful? Give feedback.
All reactions