function addComment()
{
var comment = {
'text' : $('#comment_text_box').val(),
'target' : 'jklfdsajkfdsajkdfk',
'targetId' : '85'
};
comment = $.toJSON(comment); // probowalem serializacji i innych wynalazkow i nic

$.ajax({
'type' : 'POST',
'url' : 'ajax/events.php',
'dataType' : 'json',
'data' : comment,
'success' : function(data){
},
'error' : function(XMLHttpRequest, textStatus, errorThrown) {
}
});
return false;
}
if('POST' == $_SERVER['REQUEST_METHOD']) { $json = json_decode($_POST['submit_comment'], true); $json->text // nic nie ma; }