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

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

时间:2018-01-12 14:20:09      阅读:458      评论:0      收藏:0      [点我收藏+]

标签:lang   ppi   not   .net   服务器   客户端   数据   tpm   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"])

遇到这样的错误,主要是服务器数据和客户端数据类型不一致,这里遇到的publishTime数据类型,服务器是datetime型,而我客户端数据是String型,就会导致这样的错误,调成一致即可。

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

标签:lang   ppi   not   .net   服务器   客户端   数据   tpm   enc   

原文地址:https://www.cnblogs.com/EasonJim/p/8275383.html

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