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

> I'm trying _really_ hard not to end up with another `isUserVerifyingPlatformAuthenticatorAvailable()` method name. I already sacrificed the simple "`optionsFromJSON()`" name I originally wanted. [...]
> 
> * `PublicKeyCredential.deserializeCreationOptionsFromJSON()`
> * `PublicKeyCredential.deserializeRequestOptionsFromJSON()`

How about:

- `PublicKeyCredentialCreationOptions.fromJSON()`
- `PublicKeyCredentialRequestOptions.fromJSON()`

...?

Or maybe `.parseJSON()` or `.parseFromJSON()` if any of those seems more appropriate. So a usage example would look like:

```js
navigator.credentials.create({ publicKey: PublicKeyCredentialCreationOptions.fromJSON(/* ... */) })
```


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


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

Received on Friday, 8 April 2022 09:31:39 UTC