一个json传参的错误:
JSON parse error: Unrecognized token 'xxx'
{
"timestamp": "2022-03-06T16:06:29.866+0000",
"status": 400,
"error": "Bad Request",
"message": "JSON parse error: Unrecognized token 'xxx': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false'); nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'tan': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')n at [Source: (PushbackInputStream); line: 2, column: 19]",
"path": "/doc/num/numModel/saveOrUpdate"
}
分析:
调试时使用的PostMan的随机参数{{$randomColor}},恰恰疏忽了引号
{
"name":{{$randomColor}}
}
解决:
{
"name":"{{$randomColor}}"
}
最后
以上就是美丽毛豆最近收集整理的关于一个json传参的错误:JSON parse error: Unrecognized token ‘xxx‘{ “timestamp“: “2022-03-06T16:06:29.866的全部内容,更多相关一个json传参的错误:JSON内容请搜索靠谱客的其他文章。
发表评论 取消回复