Edit in JSFiddle

var post = $.ajax({
    url: "/echo/json/",
    data: {json: JSON.stringify({firstName: "Jose", lastName: "Romaniello"})} ,
    type: "POST"
});

post.done(function(p){
    alert(p.firstName +  " saved.");
});

post.fail(function(){
    alert("error!");
});