OpenLayers OpenLayers

Ticket #1493: json.patch

File json.patch, 0.7 kB (added by crschmidt, 9 months ago)
  • lib/OpenLayers/Format/JSON.js

    old new  
    9595         *     characters. 
    9696         */ 
    9797        try { 
    98             if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/. 
    99                     test(json)) { 
     98            if (/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g, '@'). 
     99                                replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). 
     100                                replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { 
    100101 
    101102                /** 
    102103                 * In the second stage we use the eval function to compile the