tc39 / proposal-json-parse-with-source

Proposal for extending JSON.parse to expose input source text.
https://tc39.github.io/proposal-json-parse-with-source
MIT License
214 stars 9 forks source link

Normative: Suppress source text for JSON parse data modified before access #41

Closed gibson042 closed 1 year ago

gibson042 commented 1 year ago

Snapshot the initial data structure before exposing it to ECMAScript code. Fixes #35 Fixes #39

gibson042 commented 1 year ago

@waldemarhorwat @michaelficarra @syg I welcome your reviews.

michaelficarra commented 1 year ago

Please don't introduce an SDO with the same name as a nonterminal in the grammar (PropertyDefinitionList).

gibson042 commented 1 year ago

ArrayLiteralContentNodes returns lists which may contain Elision nodes. These are in turn passed to CreateJSONParseRecord, followed by ShallowestContainedJSONValue. So by my reading, the assertion that is step 2 of CreateJSONParseRecord will fail.

Elisions are not valid in JSON text.

gibson042 commented 1 year ago

Please don't introduce an SDO with the same name as a nonterminal in the grammar (PropertyDefinitionList).

@michaelficarra Do you have an alternative name suggestion?