原文:JSON parse error: Unrecognized token 'undefined': was expecting ('true', 'false' or 'null')處理

.報錯: JSON parse error: Unrecognized token undefined : was expecting true , false or null nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token undefined : was expectin ...

2020-12-25 05:29 0 2214 推薦指數:

查看詳情

Unrecognized token 'XXXX': was expecting ('true', 'false' or 'null')

原因是,返回或發送數據格式不規范. 當dataType指定為json后,1.4+以上的jquery版本對json格式要求更加嚴格.如果不是嚴格的json格式,就不能正常執行success回調函數. JSON格式總結下 1)鍵名稱:用雙引號 括起    2)字符串:用使用雙引號 括 ...

Fri Feb 02 00:04:00 CST 2018 0 8868
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM