Cannot deserialize instance of `` out of START_OBJECT token

时间:2025-02-18 08:45:00

测试遇到报错:

{"data":null,"status":500,"error":"JSON parse error: Cannot deserialize instance of `` out of START_OBJECT token; nested exception is : Cannot deserialize instance of `` out of START_OBJECT token\n at [Source: (PushbackInputStream); line: 1, column: 147] (through reference chain: [\"gender\"])"}

这是因为gender 属性在后端是String类型,但是前端传了一个Object对象,导致json解析错误