Skip to content

Conversation

@nicolo-ribaudo
Copy link
Member

Ref #3538 / #3391 (comment). I'm also going to use this AO in ECMA-426.

@nicolo-ribaudo nicolo-ribaudo changed the title Extract JSON parsing into its own AO Editorial: Extract JSON parsing into its own AO Feb 19, 2025
<dl class="header">
</dl>
<emu-alg>
1. [id="step-json-parse-validate"] If StringToCodePoints(_text_) is not a valid JSON text as specified in ECMA-404, throw a *SyntaxError* exception.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to reword this step otherwise ecmarkup was complaining that this AO can never return an abrupt completion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's arguably a bug in ecmarkup, but I like this wording better anyway.

spec.html Outdated
Comment on lines 46202 to 46205
<p>It is not permitted for a conforming implementation of `JSON.parse` to extend the JSON grammars. If an implementation wishes to support a modified or extended JSON interchange format it must do so by defining a different parse function.</p>
<emu-note>
<p>In the case where there are duplicate name Strings within an object, lexically preceding values for the same key shall be overwritten.</p>
</emu-note>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these two sentences from InternalizeJSONProperty to here, since they didn't really make sense there.

@bakkot bakkot added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Mar 12, 2025
@ljharb ljharb merged commit 53a42e6 into tc39:main Mar 12, 2025
7 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the ParseJSON branch March 12, 2025 22:44
@linusg linusg mentioned this pull request Apr 4, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants