16
down vote
accepted
Here are a few suggestions I would try:

1) the 'datatype' option you have specified should be 'dataType' (case-sensitive I believe)

2) try using the 'contentType' option as so:

contentType: "application/json; charset=utf-8"
I'm not sure how much that will help as it's used in the request to your post url, not in the response. See this article for more info: http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax (It's written for asp.net, but may be applicable)

3) Triple check the output of your post url and run the output through a JSON validator just to be absolutely sure it's valid and can be parsed into a JSON object. http://www.jsonlint.com

Hope some of this helps!

share|improve this answer
answered Sep 17 '08 at 3:22

Adam Weber
753411
thanks so much for taking the time to answer. it was the dataType option that I had as datatype – CarolinaJay65 Sep 17 '08 at 3:41
7	  
Just a note, setting dataType to "json" automatically sets the contentType to "application/json". – bhollis Sep 20 '08 at 4:00
@BHR +1 correct according to the docs. However, maybe useful to note: I'm working with jquery 1.6.4 atm and have found I need to explicitly set contentType: "application/json; charset=utf-8" – zack Feb 14 at 18:15
