Editorial: Extract JSON parsing into its own AO#3540
Merged
Conversation
nicolo-ribaudo
commented
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. |
Member
Author
There was a problem hiding this comment.
I had to reword this step otherwise ecmarkup was complaining that this AO can never return an abrupt completion.
Member
There was a problem hiding this comment.
That's arguably a bug in ecmarkup, but I like this wording better anyway.
nicolo-ribaudo
commented
Feb 19, 2025
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> |
Member
Author
There was a problem hiding this comment.
I moved these two sentences from InternalizeJSONProperty to here, since they didn't really make sense there.
76fb39b to
e355de5
Compare
bakkot
reviewed
Feb 19, 2025
michaelficarra
approved these changes
Feb 26, 2025
eb04c65 to
9bd6938
Compare
bakkot
approved these changes
Mar 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #3538 / #3391 (comment). I'm also going to use this AO in ECMA-426.