I have a standard javascript ajax call where I\'m setting the data: to json data.
$.ajax({ type: \"POST\", url: BaseUrl + \"User/Login\", //url:
First, the data sent must be a JSON object and not a string. Remove the quotes.
Also, in your server-side, you'll better decode the input $_POST['data'] with json_decode() (see documentaion)
$_POST['data']
json_decode()