This project is archived and is in readonly mode.

#1268 ✓invalid
ronin-21553 (at lighthouseapp)

JSON overrides "standards"-compliant browsers

Reported by ronin-21553 (at lighthouseapp) | January 9th, 2012 @ 08:31 PM

By defining var JSON = {... at the top-level, you kill any browser that already has JSON encoding/decoding built in, making it slower and less "standards"-compliant.

If I may suggest something along the lines of this:

   if(JSON) {
     JSON.encode = JSON.stringify;
     ...
   } else {
     JSON = { ... }
   }

I chose this to keep current code working. I think that moving towards the standard would be a good idea long-term, but not realistic short-term

Just a thought!

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages