ECMAScript proposal: source text access for JSON.parse() and JSON.stringify()

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 …


This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer

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.


This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer


Print Share Comment Cite Upload Translate Updates
APA

Dr. Axel Rauschmayer | Sciencx (2022-11-18T00:00:00+00:00) ECMAScript proposal: source text access for JSON.parse() and JSON.stringify(). Retrieved from https://www.scien.cx/2022/11/18/ecmascript-proposal-source-text-access-for-json-parse-and-json-stringify/

MLA
" » ECMAScript proposal: source text access for JSON.parse() and JSON.stringify()." Dr. Axel Rauschmayer | Sciencx - Friday November 18, 2022, https://www.scien.cx/2022/11/18/ecmascript-proposal-source-text-access-for-json-parse-and-json-stringify/
HARVARD
Dr. Axel Rauschmayer | Sciencx Friday November 18, 2022 » ECMAScript proposal: source text access for JSON.parse() and JSON.stringify()., viewed ,<https://www.scien.cx/2022/11/18/ecmascript-proposal-source-text-access-for-json-parse-and-json-stringify/>
VANCOUVER
Dr. Axel Rauschmayer | Sciencx - » ECMAScript proposal: source text access for JSON.parse() and JSON.stringify(). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/11/18/ecmascript-proposal-source-text-access-for-json-parse-and-json-stringify/
CHICAGO
" » ECMAScript proposal: source text access for JSON.parse() and JSON.stringify()." Dr. Axel Rauschmayer | Sciencx - Accessed . https://www.scien.cx/2022/11/18/ecmascript-proposal-source-text-access-for-json-parse-and-json-stringify/
IEEE
" » ECMAScript proposal: source text access for JSON.parse() and JSON.stringify()." Dr. Axel Rauschmayer | Sciencx [Online]. Available: https://www.scien.cx/2022/11/18/ecmascript-proposal-source-text-access-for-json-parse-and-json-stringify/. [Accessed: ]
rf:citation
» ECMAScript proposal: source text access for JSON.parse() and JSON.stringify() | Dr. Axel Rauschmayer | Sciencx | https://www.scien.cx/2022/11/18/ecmascript-proposal-source-text-access-for-json-parse-and-json-stringify/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.