Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Advance to stage 3 #14

Closed
4 of 5 tasks
gibson042 opened this issue Jul 22, 2020 · 3 comments · Fixed by #33
Closed
4 of 5 tasks

Advance to stage 3 #14

gibson042 opened this issue Jul 22, 2020 · 3 comments · Fixed by #33

Comments

@gibson042
Copy link
Collaborator

gibson042 commented Jul 22, 2020

Criteria taken from the TC39 process document minus those from previous stages:

  • Complete spec text

https://github.com/tc39/proposal-json-parse-with-source/blob/master/spec.html
https://tc39.es/proposal-json-parse-with-source/

  • Designated reviewers have signed off on the current spec text
  • The ECMAScript editor has signed off on the current spec text
@gibson042
Copy link
Collaborator Author

@michaelficarra @waldemarhorwat I believe this is ready for review: https://tc39.es/proposal-json-parse-with-source/

@michaelficarra
Copy link
Member

@gibson042 Spec text LGTM, though I'd prefer if we could use ParseText in JSON.rawJSON steps 2/3. Is there a reason we don't mimic the use of ParseText in JSON.parse?

@gibson042
Copy link
Collaborator Author

JSON.rawJSON does mirror JSON.parse; step 3 of the latter matches step 2 of the former with an extra constraint. It doesn't use ParseText because it has no use for a parse tree, but are you suggesting a refactor for perfect alignment of the first two steps?

1. Let _jsonString_ be ? ToString(_text_).
1. Parse StringToCodePoints(_jsonString_) as a JSON text as specified in ECMA-404. Throw a *SyntaxError* exception if it is not a valid JSON text as defined in that specification.
1. If _jsonString_ is the empty String, or if either the first or last code unit of jsonString is any of `{`, `[`, 0x0009 (CHARACTER TABULATION), 0x000A (LINE FEED), 0x000D (CARRIAGE RETURN), or 0x0020 (SPACE), throw a **SyntaxError** exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants