[web-nfc] Is an empty record type's id null or empty string? (#465)

Honry has just created a new issue for https://github.com/w3c/web-nfc:

== Is an empty record type's id null or empty string? ==
Per 9.11.9.1 Parsing records from bytes:

> If idLength > 0, let ndef's id be result of running UTF-8 decode on the next idLength (ID field) bytes, or else let ndef's id be the empty string.

It should be empty string.

But spec says 
> The value 0x00 (Empty) indicates that there is no type or payload associated with this NDEF record. When used, the TYPE_LENGTH, ID_LENGTH and PAYLOAD_LENGTH fields are zero and the TYPE, ID and PAYLOAD fields are omitted from the NDEF record.

@beaufortfrancois would prefer null instead of empty string.

@zolkis, @kenchris, what's your opinion?

Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/465 using your GitHub account

Received on Thursday, 12 December 2019 08:26:14 UTC