ES2019 subsume JSON a.k.a. JSON ⊂ ECMAScript is shipping in Chrome, Firefox, Safari, and Node.js!
Thanks to this feature, JSON.stringify output can now safely be embedded as a literal within JavaScript programs.
https://v8.dev/features/subsume-json …
Replying to @mathias @kkotowicz
As the article points out, how you must escape depends on the exact context in which you’re embedding. <script> is not an ECMAScript concept. There’s no need to escape it if you’re generating a Node.js program, for example.
11:12 PM - 14 Aug 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.