Запрашиваемый JSON-анализ не удался, а post json_encode данные, как я могу revmoe "\"

$valueArr=htmlspecialchars(json_encode($event), ENT_QUOTES, 'UTF-8'); 

Я отправляю json_encode($valueArr) из

 <a href="javascript:void(0)" id="event_<?=$event->event_id?>" onclick='getDetailsEvent(<?php echo $valueArr;?>)' > 

к этой функции

  <script> function getDetailsEvent(eObj){ var edStr=JSON.stringify(eObj); m.ajax({ type: "POST", url: "<?php echo SITEPATH;?>/socialuser/event_calender/gethtml.php", data: "ed="+edStr+"&t=<?=time()?>", contentType: 'application/json; charset=utf-8', dataType: "json", error: function(jqXHR, exception){ if (jqXHR.status === 0){ alert('Not connect.\n Verify Network.'); }else if (jqXHR.status == 404){ alert('Requested page not found. [404]'); }else if (jqXHR.status == 500){ alert('Internal Server Error [500].'); }else if (exception === 'parsererror'){ alert('Requested JSON parse failed.'); }else if (exception === 'timeout'){ alert('Time out error.'); }else if (exception === 'abort'){ alert('Ajax request aborted.'); }else{ alert('Uncaught Error.\n' + jqXHR.responseText); } }, beforeSend:function(){ var bSend = 'loading . . . '; m('#load').show(); m('#load').html(bSend); }, success: function(response){ m('#evenDetails').html(response); } }); } </script> .  <script> function getDetailsEvent(eObj){ var edStr=JSON.stringify(eObj); m.ajax({ type: "POST", url: "<?php echo SITEPATH;?>/socialuser/event_calender/gethtml.php", data: "ed="+edStr+"&t=<?=time()?>", contentType: 'application/json; charset=utf-8', dataType: "json", error: function(jqXHR, exception){ if (jqXHR.status === 0){ alert('Not connect.\n Verify Network.'); }else if (jqXHR.status == 404){ alert('Requested page not found. [404]'); }else if (jqXHR.status == 500){ alert('Internal Server Error [500].'); }else if (exception === 'parsererror'){ alert('Requested JSON parse failed.'); }else if (exception === 'timeout'){ alert('Time out error.'); }else if (exception === 'abort'){ alert('Ajax request aborted.'); }else{ alert('Uncaught Error.\n' + jqXHR.responseText); } }, beforeSend:function(){ var bSend = 'loading . . . '; m('#load').show(); m('#load').html(bSend); }, success: function(response){ m('#evenDetails').html(response); } }); } </script> 

Теперь на этом fucntion все будет работать, если я не использую «тип данных:« json », на моем локальном сервере, но на сервере это не работает.

Это даст и ошибка

 else if (exception === 'parsererror'){ alert('Requested JSON parse failed.'); 

на вызов ajax ..

На почтовой странице при печати данных сообщения данные, подобные этому

 {\"first_name\":\"Pradeep\",\"last_name\":\"Kumar\",\"profile_image\":\"thumbnail_10000022_1359466283.jpg\",\"category\":\"Restaurant\",\"category_image\":\"icon_restaurants.png\",\"category_icons\":\"restaurants_icon.png\",\"event_id\":\"17\",\"social_users_id\":\"10000022\",\"location\":\"new, Thandla, Madhya Pradesh 457777, India\",\"lat\":\"23.0048561\",\"lng\":\"74.57584440000005\",\"title\":\"dasdasd\",\"event\":\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop p\",\"pic_event\":\"517a1d4a38d411366957386.jpg\",\"event_type\":\"1\",\"day\":\"15\",\"month\":\"5\",\"year\":\"2013\",\"date\":\"1368556200\",\"time\":\"0\"} 

Мой вопрос: если я получил данные этого типа, как я могу json_decode, потому что он содержит «\», который не будет анализировать данные на сервере.

Функция htmlspecialchars добавляет специальные символы, чтобы избежать дыр в безопасности, одним из символов является символ «/». Я предлагаю использовать только json_encode($event)