{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/browser-payment-api/issues/307","repository_url":"https://api.github.com/repos/w3c/browser-payment-api","labels_url":"https://api.github.com/repos/w3c/browser-payment-api/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/w3c/browser-payment-api/issues/307/comments","events_url":"https://api.github.com/repos/w3c/browser-payment-api/issues/307/events","html_url":"https://github.com/w3c/browser-payment-api/issues/307","id":189059406,"number":307,"title":"The myth of JSON-serializable object","user":{"login":"marcoscaceres","id":870154,"avatar_url":"https://avatars.githubusercontent.com/u/870154?v=3","gravatar_id":"","url":"https://api.github.com/users/marcoscaceres","html_url":"https://github.com/marcoscaceres","followers_url":"https://api.github.com/users/marcoscaceres/followers","following_url":"https://api.github.com/users/marcoscaceres/following{/other_user}","gists_url":"https://api.github.com/users/marcoscaceres/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoscaceres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoscaceres/subscriptions","organizations_url":"https://api.github.com/users/marcoscaceres/orgs","repos_url":"https://api.github.com/users/marcoscaceres/repos","events_url":"https://api.github.com/users/marcoscaceres/events{/privacy}","received_events_url":"https://api.github.com/users/marcoscaceres/received_events","type":"User","site_admin":false},"labels":[{"id":332152665,"url":"https://api.github.com/repos/w3c/browser-payment-api/labels/help%20wanted","name":"help wanted","color":"159818","default":true},{"id":332152667,"url":"https://api.github.com/repos/w3c/browser-payment-api/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"zkoch","id":130235,"avatar_url":"https://avatars.githubusercontent.com/u/130235?v=3","gravatar_id":"","url":"https://api.github.com/users/zkoch","html_url":"https://github.com/zkoch","followers_url":"https://api.github.com/users/zkoch/followers","following_url":"https://api.github.com/users/zkoch/following{/other_user}","gists_url":"https://api.github.com/users/zkoch/gists{/gist_id}","starred_url":"https://api.github.com/users/zkoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkoch/subscriptions","organizations_url":"https://api.github.com/users/zkoch/orgs","repos_url":"https://api.github.com/users/zkoch/repos","events_url":"https://api.github.com/users/zkoch/events{/privacy}","received_events_url":"https://api.github.com/users/zkoch/received_events","type":"User","site_admin":false},"assignees":[{"login":"zkoch","id":130235,"avatar_url":"https://avatars.githubusercontent.com/u/130235?v=3","gravatar_id":"","url":"https://api.github.com/users/zkoch","html_url":"https://github.com/zkoch","followers_url":"https://api.github.com/users/zkoch/followers","following_url":"https://api.github.com/users/zkoch/following{/other_user}","gists_url":"https://api.github.com/users/zkoch/gists{/gist_id}","starred_url":"https://api.github.com/users/zkoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkoch/subscriptions","organizations_url":"https://api.github.com/users/zkoch/orgs","repos_url":"https://api.github.com/users/zkoch/repos","events_url":"https://api.github.com/users/zkoch/events{/privacy}","received_events_url":"https://api.github.com/users/zkoch/received_events","type":"User","site_admin":false}],"milestone":null,"comments":14,"created_at":"2016-11-14T09:00:49Z","updated_at":"2016-12-06T23:31:00Z","closed_at":null,"body":"I might be wrong, but I recall \"JSON-serializable object\" coming up in the past in other specs and being problematic: \r\n\r\n> The term JSON-serializable object used in this specification means an object that can be serialized to a string using JSON.stringify and later deserialized back to an object using JSON.parse with no loss of data.\r\n\r\nBut I'm pretty sure it's a bit of a 🦄 - or it should be actually defined as to how one actually works that out. Right now, the spec basically implies:\r\n```JS\r\ntry {\r\n   JSON.parse(JSON.stringify(obj)); \r\n} catch(err){\r\n   throw new Error(\"Not a JSON-serializable object\");\r\n}\r\n```\r\n \r\nThat seems nasty. Could we check with public-script-coord what the right thing to do here is? \r\n\r\nThere might be an actual object type that we can use here.  \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/w3c/browser-payment-api/issues/comments/265307254","html_url":"https://github.com/w3c/browser-payment-api/issues/307#issuecomment-265307254","issue_url":"https://api.github.com/repos/w3c/browser-payment-api/issues/307","id":265307254,"user":{"login":"bzbarsky","id":1457979,"avatar_url":"https://avatars.githubusercontent.com/u/1457979?v=3","gravatar_id":"","url":"https://api.github.com/users/bzbarsky","html_url":"https://github.com/bzbarsky","followers_url":"https://api.github.com/users/bzbarsky/followers","following_url":"https://api.github.com/users/bzbarsky/following{/other_user}","gists_url":"https://api.github.com/users/bzbarsky/gists{/gist_id}","starred_url":"https://api.github.com/users/bzbarsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzbarsky/subscriptions","organizations_url":"https://api.github.com/users/bzbarsky/orgs","repos_url":"https://api.github.com/users/bzbarsky/repos","events_url":"https://api.github.com/users/bzbarsky/events{/privacy}","received_events_url":"https://api.github.com/users/bzbarsky/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T23:31:00Z","updated_at":"2016-12-06T23:31:00Z","body":"Are we sure we want to take an object as input, not an existing JSON string?\r\n\r\nIf we are (e.g. if callers are expected to construct the object on the fly instead of producing it from JSON to start with), it would be good to sort out https://github.com/w3c/browser-payment-api/issues/346 and https://github.com/w3c/browser-payment-api/issues/338 too so the processing model is actually defined.  It's hard to write a useful PR without knowing what should happen to the string after it's generated."}}
{"actor":{"display_login":"bzbarsky"}}