Can not deserialize instance of java.lang.String out of START_OBJECT token
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.combanc.jxhd.webservice.net.model.GetAffairNewsListResponse["list"]->com.combanc.jxhd.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.combanc.jxhd.webservice.net.model.GetAffairNewsListResponse["list"]->com.combanc.jxhd.webservice.net.model.AffairNewsList["publishTime"])


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

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/smileiam/article/details/49964289
文章标签: Android
个人分类: Android开发
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Can not deserialize instance of java.lang.String out of START_OBJECT token

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭