As of Firefox 131, I intend to turn JSON.parse
with source on by default on all desktop platforms. It has
been developed behind the
javascript.options.experimental.json_parse_with_source
preference. The API shipped in Chromium last
year (https://chromestatus.com/feature/5121582673428480),
and implementation in WebKit is underway (https://bugs.webkit.org/show_bug.cgi?id=248031).
Bug to turn on by default: http://bugzilla.mozilla.org/show_bug.cgi?id=1913085
is the bug to enable, and https://bugzilla.mozilla.org/show_bug.cgi?id=1658310
is the meta bug for this.
Standard: https://tc39.es/proposal-json-parse-with-source
This feature was previously discussed in this "Intent to prototype" thread: https://groups.google.com/a/mozilla.org/g/dev-platform/c/R9UUdVUuUGU/m/H3e_Me1XAAAJ
Let me know if you have any questions,
This change landed in Firefox Nightly 132, rather than 131.
-- Bryan Thrall Senior Software Engineer Mozilla
We discovered some performance issues with this implementation,
so I'm going to disable the feature by default in Firefox 132
until we can get the issues resolved.
We are now planning on shipping Firefox 135 with JSON.parse enabled by default on all desktop platforms.
Here is the bug to turn it on by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1934622
Let me know if you have any questions!