码迷,mamicode.com
首页 > 编程语言 > 详细

Jackson错误:Can not deserialize instance of java.lang.String out of START_OBJECT token

时间:2019-08-29 00:19:21      阅读:94      评论:0      收藏:0      [点我收藏+]

标签:instance   could not   puts   service   ebs   reference   方式   apache   enc   

org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: org.apache.http.conn.EofSensorInputStream@42b0f150; line: 1, column: 112] (through reference chain: com.webservice.net.model.GetAffairNewsListResponse["list"]->com.webservice.net.model.AffairNewsList["publishTime"]); 

nested exception is org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token

 at [Source: org.apache.http.conn.EofSensorInputStream@42b0f150; line: 1, column: 112] (through reference chain: com.webservice.net.model.GetAffairNewsListResponse["list"]->com.webservice.net.model.AffairNewsList["publishTime"])

出现上述错误的原因是,我再接收前端的参数的时候,没有按照正确的方式进行接收,前端给我的是一个json格式字符串,而我接收的是一个数组,所以才会出现上面的异常

 

Jackson错误:Can not deserialize instance of java.lang.String out of START_OBJECT token

标签:instance   could not   puts   service   ebs   reference   方式   apache   enc   

原文地址:https://www.cnblogs.com/qingmuchuanqi48/p/11427291.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!