Am am successfully parsing and sending json values from my client for my server side controller to receive and decode
$("#test2").click(function() {
$.ajax({
type: "POST",
url: "<?php echo $this->baseUrl() ?>/expensetypes/add",
data: JSON.stringify(wrapFormValues($('#expensetypes'))),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
});
However in my controller the code $this->getRequest()->getPost()
doesn't seem to receive the json object that my client is sending though firebug clearly shows that my json object is being parsed and sent.
What am I missing?