Re: [w3c/browser-payment-api] The myth of JSON-serializable object (#307)

After working on https://github.com/w3c/webpayments-methods-card/issues/20 this is more confusing than ever. As far as I can tell the desired semantics are:

1. JSON-stringify then JSON-parse the data value just so that it throws exceptions
2. Then, ignore all that, and convert data to a dictionary
3. Presumably, at some point, the user agent uses the data in the dictionary (i.e. the C++ object) to perform basic card stuff. This is never specified anywhere (#338).

To me it seems like step 1 is entirely redundant. If the desire is to support HTTP-based payment methods that require serialization, then they should define steps to serialize to JSON and send over HTTP and use that to compose a response. But for basic card, this shouldn't be necessary at all, since the normalization is already done by the dictionary conversion step.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/issues/307#issuecomment-267143223

Received on Wednesday, 14 December 2016 20:14:06 UTC