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

feat: allow passing custom json parser and encoder #6428

Open
wants to merge 1 commit into
base: v1.x
Choose a base branch
from

Conversation

austenadler
Copy link

This PR adds two new config parameters, jsonParser and jsonEncoder to allow users to choose which JSON parser to use. It is backward compatible: if null or undefined, the default JSON.{parse,stringify} is used.

Type annotations were taken from tye TypeScript repository

This is mostly to fix issues with parsing large numbers in JS.

Related issue: #6279

@mihai-stancu
Copy link

Comes in handy if you want to specify custom reviver callback for JSON.parse,

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

Successfully merging this pull request may close these issues.

None yet

2 participants