Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Editorial: Extract JSON parsing into its own AO #3540

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
Contributor

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.

@nicolo-ribaudo nicolo-ribaudo requested a review from bakkot March 6, 2025 11:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants