Bug Tracker

Opened 13 years ago

Closed 13 years ago

#6664 closed bug (worksforme)

parse error from jQuery.parseJSON(data)

Reported by: codylindley Owned by:
Priority: Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: parse JSON ajax Cc:
Blocked by: Blocking:


I am getting a JSON parse error using type JSON or TEXT in an ajax request. Yehuda helped me boil it down to this.


jQuery.parseJSON('{"user":"userkey","addSchoolLink":{"text":"add school","id":"addSchoolBtn"},"schools":[{"rank":1,"name":"Aame of School 43214","schoolID":"987654","location":"town, state","vote":{"text":"login to vote","url":"url here","className":"loginToVoteBtn"}},{"rank":34,"name":"Bame of School 1321","schoolID":"123456","location":"town, state","vote":{"text":"vote for this school","url":"url here","className":"voteBtn"}},{"rank":34,"name":"Bame of School 1321","schoolID":"123456","location":"town, state","vote":{"text":"html that they already voted","url":false,"className":false}}]}​​​')

For me this returns an error in every browser but FF?

Change History (2)

comment:1 Changed 13 years ago by codylindley


looks like an encoding issue


finally got a validation tool to throw an error.

comment:2 Changed 13 years ago by dmethvin

Resolution: worksforme
Status: newclosed

When I copy/pasta that into jsonlint it works. It might be a strange non-Unicode encoding of a char.

Note: See TracTickets for help on using tickets.