Re: [web-nfc] Check 'typedef any NDEFRecordData' to be a JSON type? (#307)

Ok looked at ECMAScript spec, in cases of unserializable values you just get `undefined` back:

![image](https://user-images.githubusercontent.com/1101339/63831919-fcb84b80-c96f-11e9-99a6-005c07a88920.png)

So we can throw on that, or just store 0 bytes (which might make more sense).

Then question is what happens currently if we are reading a JSON MIME type with 0 bytes written? Do we parse that back as `undefined` or `null` or does it throw?

![image](https://user-images.githubusercontent.com/1101339/63832056-4d2fa900-c970-11e9-8c76-d2459486ff19.png)



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

Received on Wednesday, 28 August 2019 06:46:28 UTC