babel / proposals

✍️ Tracking the status of Babel's implementation of TC39 proposals (may be out of date)
https://github.com/tc39/proposals
433 stars 39 forks source link

Subsume JSON strings (Stage 4) #43

Open hzoo opened 6 years ago

hzoo commented 6 years ago

By @gibson042, champion: @mathiasbynens

Presented as Stage 1 at Sept 2017 Moved to Stage 2 at Nov 2017 Moved to Stage 3 at Jan 2018 Moved to Stage 4 at May 2018

Spec repo: https://github.com/tc39/proposal-json-superset

ECMAScript claims JSON as a subset in JSON.parse, but (as has been well-documented) that is not true because JSON strings can contain unescaped U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR characters while ECMAScript strings cannot.

-[x] Babel PR by @jridgewell: https://github.com/babel/babel/pull/7985