Opened 13 years ago
Closed 13 years ago
#5815 closed bug (invalid)
jQuery 1.4 fails with JSON on Chrome
Reported by: | ckruse | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4.1 |
Component: | ajax | Version: | 1.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery 1.4 throws a parse error with json AJAX requests; same JSON with Firefox can be parsed without problems. After a bit of hacking it seems that the JSON syntax check in httpData fails:
if (/[\],:{}\s]*$/.test(data.replace(/
(?:["
\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
.replace(/"["
\n\r]*"|true|false|null?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:|:|,)(?:\s*\[)+/g, ""))) {
…” everything works like a charm. Maybe a RegExp problem with Chrome? |
Change History (2)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Component: | unfiled → ajax |
---|---|
Resolution: | → invalid |
Status: | new → closed |
The check is correct, perhaps the app creating the JSON is creating invalid JSON?
If you want to pursue this, please reopen with more information including a sample of the trouble-making JSON.
Note: See
TracTickets for help on using
tickets.
Dammit, wiki code parser. Sorry.
When I disable the check with „if(true | | …”