Not Recieving JSON object into my Zend Controller

Posted by davykiash on Stack Overflow See other posts from Stack Overflow or by davykiash
Published on 2010-03-16T10:55:11Z Indexed on 2010/03/16 10:56 UTC
Read the original article Hit count: 314

Filed under:
|

Am am sucessfully parsing and sending json values from my client for my server side controller to recieve and parse

$("#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() doesnt seem to recieve 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?

© Stack Overflow or respective owner

Related posts about zend

Related posts about JSON