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

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

posted @ 2020-12-25 05:29  不变的变  阅读(9386)  评论(0编辑  收藏  举报