Re: [web-nfc] toJSON should return any (which includes undefined) (#310)

In our case we might use `toJSON()` for reads and writes. 
In both cases, IMHO `null` maps well. 
On reads, payload length 0 (empty PAYLOAD) will result in `null`.
On writes, `null` will translate to empty PAYLOAD and payload length 0.
But _in principle_, `toJSON()` returns `any` because it could return any simple or compound type or `null`. It would be nice to have Web IDL support for this!

-- 
GitHub Notification of comment by zolkis
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/310#issuecomment-526163629 using your GitHub account

Received on Thursday, 29 August 2019 12:31:57 UTC