我有下面的JSONP完整字符串,從我的aspx頁面返回給客戶端。當字符串返回到JSONP時獲取無效的JSON錯誤Jquery調用
"processjsonp({\"result\": [\"CreateCityKeys\", \"Keyword -Spokane already exists in City\r\nKeyword -Anchorage already exists in City\r\nKeyword -Fairbanks already exists in City\r\nKeyword -Bellingham already exists in City\r\nKeyword -Juneau already exists in City\r\nKeyword -Boise already exists in City\r\nKeyword -Victoria already exists in City\r\nKeyword -Kelowna already exists in City\r\nKeyword -Eugene already exists in City\r\nKeyword -Medford already exists in City\r\nKeyword -Tucson already exists in City\r\nKeyword -Walla Walla already exists in City\r\nKeyword -Wenatchee already exists in City\r\nKeyword -Pasco already exists in City\r\nKeyword -Pullman already exists in City\r\nKeyword -Redmond already exists in City\r\nKeyword -Yakima already exists in City\r\nKeyword -Ketchikan already exists in City\r\nKeyword -Kauai Island already exists in City\r\nKeyword -Kona already exists in City\r\nKeyword -Kahului already exists in City\r\n\"]})"
我知道錯誤必須是\ r \ n之間,請建議擺脫這一點。
謝謝
M.S.
編輯:錯誤 - JSONP解析錯誤
請說明錯誤。 – 2012-02-03 11:22:48
它只是一個解析器錯誤,當它回到客戶端 – 2012-02-03 11:27:09