Author: etnu
Date: Thu Jan 17 17:52:18 2008
New Revision: 613038

URL: http://svn.apache.org/viewvc?rev=613038&view=rev
Log:
Modified json.js to accept single quotes around strings. This technically 
violates the JSON spec, but it is needed as a short term solution to deal with 
improperly implemented json generators (including our own json proxy).


Modified:
    incubator/shindig/trunk/features/core/json.js

Modified: incubator/shindig/trunk/features/core/json.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/core/json.js?rev=613038&r1=613037&r2=613038&view=diff
==============================================================================
--- incubator/shindig/trunk/features/core/json.js (original)
+++ incubator/shindig/trunk/features/core/json.js Thu Jan 17 17:52:18 2008
@@ -134,7 +134,7 @@
         parse: function (text) {
             try {
                 return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
-                        text.replace(/"(\\.|[^"\\])*"/g, ''))) &&
+                        text.replace(/("(\\.|[^"\\])*")|('(\\.|[^'\\])*')/g, 
''))) &&
                     eval('(' + text + ')');
             } catch (e) {
                 return false;


Reply via email to