ECMAScript proposal: source text access for <code>JSON.parse()</code> and <code>JSON.stringify()</code>

1 · Axel Rauschmayer · Nov. 18, 2022, midnight
Summary
In this blog post, we look at the ECMAScript proposal “JSON.parse source text access” by Richard Gibson and Mathias Bynens. It gives access to source text to two kinds of callbacks: Revivers, callbacks that are passed to JSON.parse() and post-process the data it parses. Replacers, callbacks that are passed to JSON.stringify() and pre-process data before it is stringified. We’ll examine how exactly that works and what you can do with this feature....