1.報錯:
JSON parse error: Unrecognized token 'undefined': was expecting ('true', 'false' or 'null'); nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'undefined': was expecting ('true', 'false' or 'null') at [Source: java.io.PushbackInputStream@655a8572; line: 1, column: 11]
2.分析:
很明顯是json轉換出問題,所以把問題范圍限制在了前端。
3.處理:
使用JSON.Stringfy()將JavaScript 值轉換為 JSON 字符串傳到后台,報錯解決。
4.后記:
此問題發生於你所傳的的參數中含有數組或集合
