jQuery AJAX request failing in IE

Fixed, I changed the content-type from application/json; charset=utf8 to just plain application/json. I hate IE 🙂 Also to avoid IE super-caching try this: var d = new Date(); $.ajax({ url:”{{SITE_URL}}/content/twitter.json?_=”+d.getTime(), …Snip… That way each request is a new url for IE to get 😀

IE tries to download json response while submitting jQuery multipart form data containing file

You can simply return JSON from the controller as “text/html” and then parse it on the client side using JQuery.parseJSON(). Controller: return this.Json( new { prop1 = 5, prop2 = 10 }, “text/html”); Client side: jsonResponse = $.parseJSON(response); if(jsonResponse.prop1==5) { … } This solution has been working for me.

Is there a method built in spring MockMVC to get json content as Object?

As far as I know MockHttpServletResponse (Unlike RestTemplate) doesn’t have any method which could convert returned JSON to a particular type. So what you could do is use Jackson ObjectMapper to convert JSON string to a particular type Something like this String json = rt.getResponse().getContentAsString(); SomeClass someClass = new ObjectMapper().readValue(json, SomeClass.class); This will give you …

Read more