首页 > 编程语言 > 详细

Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY

时间:2018-12-11 16:42:14      阅读:1649      评论:0      收藏:0      [点我收藏+]

 

线上问题:

{
    "timestamp": "1544510665",
    "status": 400,
    "error": "Bad Request",
    "exception": "org.springframework.http.converter.HttpMessageNotReadableException",
    "message": "Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: java.io.PushbackInputStream@6d9b2ba7; line: 18, column: 18] (through reference chain: com.imdada.shine.dao.vo.SenderVo[\"poiAddress\"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: java.io.PushbackInputStream@6d9b2ba7; line: 18, column: 18] (through reference chain: com.imdada.shine.dao.vo.SenderVo[\"poiAddress\"])",
    "path": "/toc/corp/client/addSender"
}

解决方案:
发现是在解析json字符串的时候,某个字段的值本来应该是字符串,结果是[开头的

Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY

原文:https://www.cnblogs.com/pengfei860/p/10102895.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!