共计 728 个字符,预计需要花费 2 分钟才能阅读完成。
POST 发送 JSON 数据报错了:
JSON parse error: Unexpected character (‘t’ (code 116)): was expecting double-quote to start field name; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character (‘t’ (code 116)): was expecting double-quote to start field namen at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 2, column: 6]”
意思阐释:
SON 分析错误: 意外字符(“t”(代码 116)): 字段名称应该以双引号开头;嵌套异常为 com . fasterxml . Jackson . core . jsonparseexception: 意外字符(“t”(代码 116)): 应该在【Source:(org . spring framework . util . stream utils $ NonClosingInputStream】处以双引号开始字段名;第 2 行第 6 列】“
报错的原因:正确的书写格式是这样的,发送前后端都要加双引号:
{
"title": "1",
"content": "Hello World"
}
原文地址: JSON parse error: Unexpected character (‘t‘(code 116)): was expecting double-quote to start field n
正文完