The optional `context` parameter is a tc39 proposal. The feature compatibility matrix on the bottom of the MDN page is really confusing because it's showing only when `JSON.parse` was added, not whether the optional `context` parameter is supported.
I've confirmed it's available in:
- V8 11.4.31 - Node 20.12.0 (with `--harmony`) - Node 21.7.1 (without requiring `--harmony`) - Chrome 123.0.6312.107
Firefox 124.0.2 (ironically) Safari 17.3.1
https://tc39.es/proposal-json-parse-with-source/
https://github.com/tc39/proposal-json-parse-with-source
This issue links to the various browser engine tracking bugs:
https://github.com/tc39/proposal-json-parse-with-source/issu...
Which are:
• Chrome/V8: https://bugs.chromium.org/p/v8/issues/detail?id=12955
• Firefox/SpiderMonkey: https://bugzilla.mozilla.org/show_bug.cgi?id=1658310
• Safari/JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=248031
https://github.com/mdn/content/pull/32697/files
The optional `context` parameter is a tc39 proposal. The feature compatibility matrix on the bottom of the MDN page is really confusing because it's showing only when `JSON.parse` was added, not whether the optional `context` parameter is supported.
I've confirmed it's available in:
But not available in: The original blog post linked to the proposal:https://tc39.es/proposal-json-parse-with-source/
https://github.com/tc39/proposal-json-parse-with-source
This issue links to the various browser engine tracking bugs:
https://github.com/tc39/proposal-json-parse-with-source/issu...
Which are:
• Chrome/V8: https://bugs.chromium.org/p/v8/issues/detail?id=12955
• Firefox/SpiderMonkey: https://bugzilla.mozilla.org/show_bug.cgi?id=1658310
• Safari/JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=248031