Well, here is the story:
I have some data need to send to server, but they should turned into JSON dataType first.
I made such ajax call:
I've had the same problem. You can't send an object as "data", you need to stringify the object. Try this instead, with your object stringified:
$.ajax({ url: url, type: 'POST', contentType:'application/json', data: '{ name:"test", key:"foo", key2:"bar" }', dataType:'json' });