Re: [web-nfc] A record might have no payload (#309)

IMHO `toJSON()` will never return `undefined` unless we feed `undefined` to it, i.e. when `record.[[PayloadData]]` is `undefined`. 

The result of `JSON.stringify(undefined)` is `undefined`, but `JSON.parse(undefined)` will through (not valid JSON).

In NFC specs the guiding field is the payload length, PAYLOAD might be there or might be missing.

For writes, the current spec should be fine (when feeding `undefined` to writes).
For reads, we should clarify the parse algorithms to be explicit about the use of `undefined`.

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

Received on Thursday, 29 August 2019 12:50:08 UTC