Re: PSA: JSON.stringify has changed behavior wrt DOM objects in Chrome

> On 18 Mar 2015, at 09:46, Harald Alvestrand <harald@alvestrand.no> wrote:
> 
> There's been a change in the behavior of recent (canary) versions of Chrome, described here:
> 
> https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/H0MGw0jkdn4/discussion
> 
> The change means that a lot of DOM attributes are now no longer picked up by JSON.stringify; I'm not quite sure whether this was intentional or not.

Would this be why I can no longer call JSON.stringify() directly on a RTCSessionDescription ? 
- I’ve had to resort to :

createOffer(function(offer){
 offer_sdp = {
    sdp: offer.sdp.sdp
    type: offer.sdp.type
 };
 send_offer(Json.stringify(offer_sdp));
},fail);

where previously I had :

createOffer(function(offer){
 send_offer(Json.stringify(offer.sdp));
},fail);

If so, this could break a _lot_ of running code.


> 
> This affects a couple of examples in our spec that use JSON.stringify.
> I've filed #204 to deal with the issue.
> 
> Harald
> 
> 

Received on Wednesday, 18 March 2015 10:20:44 UTC