your code, I think, is not complete, if you want to send data to a server with json format, I think setup $ .ajax like this, just an example
$.ajax({
url: url,
type:"POST",
data:"JSONFile=" + json,
success:function (data) {
$('div.tooltip p').html(data);
}
});
JSONFile , json- json .
php:
$json = $_POST['JSONFile'];
var_dump(json_decode($json));
var_dump(json_decode($json, true));
symfony2 direct acces $_POST ,
$request = $this->getRequest();
$request->request->get('JSONFile'); // get a $_POST parameter