JSON source text accessBaseline · Newly available
To serialize and parse JSON in a lossless way, JSON.stringify() handles rawJSON values and JSON.parse()'s reviver callback takes a source context parameter.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Mar 31, 2025.
Browser support
DesktopChrome
1–113Not supported
114+Supportedsince May 30, 2023
Current: 155Edge
12–113Not supported
114+Supportedsince Jun 2, 2023
Current: 154Firefox
1–134Not supported
135+Supportedsince Feb 4, 2025
Current: 157Safari
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27MobileChrome Android
18–113Not supported
114+Supportedsince May 30, 2023
Current: 155Firefox Android
4–134Not supported
135+Supportedsince Feb 4, 2025
Current: 157Safari iOS
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27How to use
Every current browser supports this, but it only became Baseline on Mar 31, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: isRawJSON.
Feature detection
JS · check before using
if ("isRawJSON" in JSON || ("prototype" in JSON && "isRawJSON" in JSON.prototype)) {
// JSON.isRawJSON is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (3). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| JSON.isRawJSON | 114 | 114 | 135 | 18.4 | 114 | 135 | 18.4 |
| JSON.parse.reviver_parameter_context_argument | 114 | 114 | 135 | 18.4 | 114 | 135 | 18.4 |
| JSON.rawJSON | 114 | 114 | 135 | 18.4 | 114 | 135 | 18.4 |