Side navigation
#5815 closed bug (invalid)
Opened January 15, 2010 09:48AM UTC
Closed June 14, 2010 12:01AM UTC
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, ""))) {
When I disable the check with „if(true || …” everything works like a charm. Maybe a RegExp problem with Chrome?
Attachments (0)
Change History (2)
Changed January 15, 2010 09:51AM UTC by comment:1
Changed June 14, 2010 12:01AM UTC by comment:2
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.
Dammit, wiki code parser. Sorry.
When I disable the check with „if(true | | …”