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

Custom JSON serializer (for BigInt) [feature request] #22

Open
damianobarbati opened this issue Jan 1, 2019 · 0 comments
Open

Custom JSON serializer (for BigInt) [feature request] #22

damianobarbati opened this issue Jan 1, 2019 · 0 comments

Comments

@damianobarbati
Copy link

Is it possible to customize the serializer?
My applications use BigInt and V8 (just as Chrome) throws a nice:

  TypeError: Do not know how to serialize a BigInt
      at JSON.stringify (<anonymous>)
      at next.then (/Users/damz/Desktop/cfciampino-reloaded/node_modules/koa-json/index.js:50:32)

I'd like to apply a workaround like (see next) when returning my payloads:
tc39/proposal-bigint#146 (comment)

Good jobs guys!

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

1 participant