Bug Tracker

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:


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, "@")

\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?

Change History (2)

comment:1 Changed 13 years ago by ckruse

Dammit, wiki code parser. Sorry.

When I disable the check with „if(true | | …”

comment:2 Changed 13 years ago by dmethvin

Component: unfiledajax
Resolution: invalid
Status: newclosed

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.