Ticket #6152 (closed enhancement: fixed)
parseJSON regex is redundant when native parsing is available.
|Reported by:||nikow||Owned by:|
In the parseJSON (line 496) a regex cleanup is performed before the string is parsed. If the browser supports native JSON parsing then this is redundant, since the browser is responsible for filtering the JSON string.
For very large JSON objects this is a real problem, since the regex can cause an Error in Firefox (3.0 to 3.6 raise 'script stack space quota is exhausted'). This can happen in cases where the naive eval approach of jQuery 1.3 did not cause such problems and was fast enough for these large objects to be usable.
Therefore the regex checking should only be done if no native parser is found.
- Status changed from closed to reopened
- Resolution wontfix deleted