Re: [webauthn] New PublicKeyCredential methods for JSON (de)serialization (#1703)

> Based on some discussion during the WG meeting today, it may be feasible to update the `.toJSON()` method here to reference https://webidl.spec.whatwg.org/#idl-tojson-operation, and then in plain language describe that the client has the responsibility to return an **object** with `ArrayBuffer`'s encoded to strings using Base64URL.
> 
> @kreichgauer Did I understand this correctly? Or would we still need to wrangle IDL definitions to declare this behavior?

That's how I interpret the toJSON section of the WebIDL spec at least.

I did a little digging, and Web Payments seems to want to define [PaymentResponse.toJSON()](https://www.w3.org/TR/payment-request/#paymentresponse-interface)
 this way.  Though they just refer to the default method steps of the regular operation, which we can't.

The Push API is a counter example. In [PushSubscription.toJSON()](https://www.w3.org/TR/push-api/#dom-pushsubscription-tojson) it defines a separate PushSubscriptionJSON dictionary. But it defines its own processing rules.

-- 
GitHub Notification of comment by kreichgauer
Please view or discuss this issue at https://github.com/w3c/webauthn/pull/1703#issuecomment-1064291832 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 10 March 2022 17:03:14 UTC