任何人都可以引導,下面哪些錯誤生成的JSON代碼是通過asp.net web服務的方法生成的。從asp.net Webservice生成無效的JSON?
---------------------------
Message from webpage
---------------------------
Error: Invalid JSON: <?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">[{"id:" '1',"title:" 'Event1',"start:" 1310236200,"end:" 1310236200,"allDay:"true,"description:" 'Event1'},{"id:" '3',"title:" 'Event2',"start:" 1309804200,"end:" 1309804200,"allDay:"true,"description:" 'Event2'},{"id:" '4',"title:" 'Event5',"start:" 1311705000,"end:" 1311705000,"allDay:"true,"description:" 'Event5'},{"id:" '5',"title:" 'Event3',"start:" 1309006800,"end:" 1309006800,"allDay:"false,"description:" 'Event3'},{"id:" '6',"title:" 'Event4',"start:" 1310495400,"end:" 1310495400,"allDay:"true,"description:" 'Event4'},{"id:" '7',"title:" 'Time Event1',"start:" 1312144200,"end:" 1312174800,"allDay:"false,"description:" 'Time Event1'},{"id:" '8',"title:" 'save1',"start:" 1312309800,"end:" 1312309800,"allDay:"true,"description:" 'save1111'},{"id:" '9',"title:" 'today',"start:" 1311273000,"end:" 1311273000,"allDay:"true,"description:" 'today'}]</string>
---------------------------
OK
---------------------------
這是真的。但是如何在asp.net中爲JSON調用webservice? –
什麼是真正奇怪的,我是,我XMLHttpRequest是返回XML,並通過JSON.parse()來與谷歌Chrome瀏覽器被成功解析,但在Android瀏覽器的股票(這我還帶領相信運行WebKit的),我得到一個「意外的令牌非法「錯誤。 它是這個原因,我認爲,如果它的工作對我的開發機瀏覽器,它會在Android瀏覽器工作了。 –