您的位置:首页 > 移动开发 > Objective-C

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

2015-11-21 14:31 661 查看
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型,就会导致这样的错误,调成一致就好了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: