Can not deserialize instance of java.lang.String out of START_OBJECT token
2017-11-02 20:56
756 查看
转自
http://blog.csdn.net/smileiam/article/details/49964289
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型,就会导致这样的错误,调成一致就好了。
http://blog.csdn.net/smileiam/article/details/49964289
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型,就会导致这样的错误,调成一致就好了。
相关文章推荐
- Jackson错误:Can not deserialize instance of java.lang.String out of START_OBJECT token
- Could not read JSON: Can not deserialize instance of java.lang.String out of START_OBJECT token
- Can not deserialize instance of java.lang.String out of START_OBJECT token
- Could not read JSON: Can not deserialize instance of java.lang.Integer out of START_OBJECT token
- 解决用户自生成meta导入kylin后报错问题Can not deserialize instance of java.lang.String[] out of VALUE_STRING token
- Cannot deserialize instance of java.lang.String out of START_ARRAY/START_OBJECT token,RestTemplate小坑
- Could not read JSON: Can not deserialize instance of java.lang.String[] out of VALUE_STRING token
- Could not read document: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
- Can not deserialize instance of java.util.ArrayList out of VALUE_FALSE token
- selenium cant start a new browser(ie7):java.lang.StringIndexOutOfBoundsException: String index out of range: -1
- Could not read JSON: Can not deserialize instance of out of START_ARRAY token
- Jackson反序列化提示:Can not deserialize instance of Task out of START_ARRAY token
- org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.util.Date from String value '20Spring Jackson 反序列化Date时遇到的问题
- org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.util.Date from String value '2012-12-12 12:01:01': not a valid representation (error: Can not parse date "2012-12-
- org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList o
- jenkins中,maven打包报Can not execute Findbugs:java.lang.OutOfMemoryError:java heap spacek扫描错误
- Can not construct instance of java.util.LinkedHashMap: no String-argument constructor/factory method
- Android 异常java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
- Hibernate query.list()查询发生java.lang.StringIndexOutOfBoundsException: String index out of range: 0错误
- struts2--java.lang.IllegalAccessException: Class ognl.OgnlRuntime can not access a member of...问题解决方案