AJAX post JSON data from Javascript to Grails
问题 I'm trying to POST JSON formatted data from Javascript (using Prototype) to Grails. My Javascript code is: var JSONObject = new Object; JSONObject.id = "23"; JSONObject.name = "Test 1"; JSONstring = JSON.stringify(JSONObject); var url = "${createLink(controller:'testController', action:'receiveJson')}"; new Ajax.Request(url, { method:'post', contentType:'application/json', parameters:JSONstring, asynchronous:true, onSuccess: function (req) { sendInfoResponse(req.responseText); } }); and the