mirror of
https://github.com/RGBCube/serenity
synced 2025-10-24 12:12:33 +00:00
Previously we would treat the empty string as `null`. This caused
JavaScript like this to fail:
```js
var object = {};
try {
object = JSON.parse("");
} catch {}
var array = object.array || [];
```
Since `JSON.parse("")` returned null instead of throwing, it would set
`object` to null and then try and use it instead of using the default
backup value.
|
||
|---|---|---|
| .. | ||
| JSON.@@toStringTag.js | ||
| JSON.parse-reviver.js | ||
| JSON.parse.js | ||
| JSON.stringify-exception-in-property-getter.js | ||
| JSON.stringify-order.js | ||
| JSON.stringify-proxy.js | ||
| JSON.stringify-replacer.js | ||
| JSON.stringify-space.js | ||
| JSON.stringify.js | ||