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


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.后记:

此问题发生于你所传的的参数中含有数组或集合


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM