Side navigation
#6664 closed bug (worksforme)
Opened June 13, 2010 06:45PM UTC
Closed June 16, 2010 02:14AM UTC
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: |
Description
I am getting a JSON parse error using type JSON or TEXT in an ajax request. Yehuda helped me boil it down to this.
code:
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?
Wait...
looks like an encoding issue
http://gyazo.com/114e20324d1c4e82f56532acf8cf792f.png
finally got a validation tool to throw an error.