Skip to content

Conversation

equalsJeffH
Copy link
Contributor

@equalsJeffH equalsJeffH commented Jul 17, 2018

this fixes #193.

note that this attendant change to ECMA262 needs to also be accomplished:
https://mail.mozilla.org/pipermail/es-discuss/2018-March/050324.html

see also: w3c/webauthn#712

HTH,

=JeffH

ps: we PayPal signed the whatwg participant agreement, see: https://github.com/whatwg/participant-data/blob/master/entities.json


Preview | Diff

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, with minor suggestions and the missing link thing. Will mark "do not merge yet" until the corresponding ECMAScript change is ready.

As for participant agreement, can you join the "paypal2" GitHub organization, or make public your membership? https://help.github.com/articles/publicizing-or-hiding-organization-membership/

infra.bs Outdated
@@ -1042,6 +1042,19 @@ as 200/`<code>OK</code>`.
<p class=note>The conventions used in this step are those of the JavaScript specification.
</ol>

<p>To <dfn export>JSON stringify and UTF-8 encode to bytes</dfn> a given JavaScript value
Copy link
Member

Choose a reason for hiding this comment

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

Maybe omit "and UTF-8 encode" for symmetry? Since we assume everything is UTF-8 these days? Or maybe we should keep it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally would prefer it to be explicit. but y'all are editors of this spec, so up to you. IIRC that is the phrase that Anne suggested a while back.

infra.bs Outdated
<p>Let <var>jsonString</var> be the result of
<a abstract-op>Call</a>(<a>%JSONStringify%</a>, undefined, « <var>value</var> »).
[[!ECMA-262]]
<p class=note>The conventions used in this step are those of the JavaScript specification.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add <p class=note>Since no additional arguments are passed to <a>%JSONStringify%</a>, the resulting string will have no whitespace inserted</p>

Copy link
Contributor Author

@equalsJeffH equalsJeffH Jul 23, 2018

Choose a reason for hiding this comment

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

I added your suggested Note to the existing Note. if not OK will make it a separate note, see a3777de .

infra.bs Outdated
<ol>
<li>
<p>Let <var>jsonString</var> be the result of
<a abstract-op>Call</a>(<a>%JSONStringify%</a>, undefined, « <var>value</var> »).
Copy link
Member

Choose a reason for hiding this comment

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

I think you'll need to add a link thingy to the top of the document for JSONStringify, like was done for JSONParse.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, thx.

@equalsJeffH
Copy link
Contributor Author

my paypal2 org membership is already public AFAICT:
https://github.com/PayPal2
https://github.com/equalsJeffH

..?

@equalsJeffH
Copy link
Contributor Author

@domenic
AFAICT I'm a member of PayPal2 org: https://github.com/PayPal2

@domenic
Copy link
Member

domenic commented Jul 19, 2018

Heh, I imagine you can see that, as you're a member. But if you use incognito mode or similar, you'll find that PayPal2 currently has no public members:

image

So, you need to follow the above link's instructions and publicize.

@equalsJeffH
Copy link
Contributor Author

Heh, I imagine you can see that, as you're a member. But if you use incognito mode or similar, you'll find that PayPal2 currently has no public members.

doh, sorry. I think it is fixed now.

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

LGTM. @annevk mind checking? Would like your thoughts on the naming as well. (At first I was going to suggest "JSON stringify to bytes", but then I realized that makes no sense. Maybe just "serialize JSON to bytes"?)

Unclear whether we should wait for tc39/ecma262#1272 or not. I'll poke it.

@annevk
Copy link
Member

annevk commented Aug 2, 2018

We call the other "parse JSON from bytes". It would make sense then to start this one with "stringify". But I guess "stringify JSON to bytes" is a little weird.

I don't have a strong opinion here. It does seem that the downstream PR landed already, so if we make a change we'd have to change that too.

@aphillips
Copy link
Contributor

@annevk "stringify" and "to bytes" don't mentally go together to me, since to me the starting state is the string, while the bytes are just data (payload). How about "serialize"?

@annevk
Copy link
Member

annevk commented Aug 2, 2018

Yeah that works, it's just not what JavaScript^WECMAScript calls it.

@domenic
Copy link
Member

domenic commented Aug 2, 2018

I'm a fan of serialize. I'll update this, merge, and also submit a PR to webauth as recompense for us being wishy washy over here :)

@equalsJeffH
Copy link
Contributor Author

thanks guys :)

domenic added a commit to domenic/webauthn that referenced this pull request Aug 2, 2018
This is a follow-up to w3c#1017 to use the final name arrived at in whatwg/infra#207 and merged into the Infra Standard.
@domenic domenic merged commit 25f6859 into whatwg:master Aug 2, 2018
equalsJeffH pushed a commit to w3c/webauthn that referenced this pull request Aug 8, 2018
This is a follow-up to #1017 to use the final name arrived at in whatwg/infra#207 and merged into the Infra Standard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Infra lacks a "JSON stringify and UTF-8 encode to bytes" operation
4 participants