我是靠谱客的博主 美丽毛豆,这篇文章主要介绍一个json传参的错误:JSON parse error: Unrecognized token ‘xxx‘{ “timestamp“: “2022-03-06T16:06:29.866,现在分享给大家,希望可以做个参考。

一个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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部