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
Implement proposal-json-parse-with-source API #185
Comments
You make a good point. I can see how this would be a useful extension to the API. |
Thanks for the suggestions. While I like your ideas, I don't plan on adding any more features to the JSON5 parser at this time. In an effort to keep JSON5 simple, this library will be a reference parser rather than a full-featured, production-ready implementation of a JSON5 parser. |
I'm reopening this issue to track and discuss https://github.com/tc39/proposal-json-parse-with-source since it has gained some traction lately. I will not be implementing any of the features from proposal-json-parse-with-source unless and until it gets to stage 4 of the TC39 process. |
https://github.com/tc39/proposal-json-parse-with-source is now at stage 3 of the TC39 process. |
The
reviver
function receives only the already converted value, which could be inconvenient if the convertion is not being done correctly by the parser.For example, if a nunber is greater than
Number.MAX_SAFE_INTEGER
then the convertion will not be OK:By adding an extra string argument, will give the programmer a way to do the convertion on their own:
Thanks
The text was updated successfully, but these errors were encountered: