Pseudo-JSON with unquoted property names

Matthew Miller thunderbug at
Fri Jun 5 15:22:57 PDT 2009

The app I work on for my employer has a lot of JSON with unquoted names that gets sent from the server for AJAX calls. I don't think there would be any uprising over having to go back and quote the names. That is not a major undertaking for our app at least. 

Could you say why that app does not quote names? Was it an accident that did not get caught because of an eval-based JSON decoder, or was it intended for some reason?

When we (I) started working with JSON, I learned about it through blog posts and examples, and those did not quote the names. I did not even know you could quote names until after well over a year of using it. We don't use eval() itself, but rather construct statements to assign the JSON objects to variables and execute it by the method below.

var s = document.createElement('script');
s.type = 'text/ecmascript';
s.text = text;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es5-discuss mailing list