Jackson错误:Can not deserialize instance of java.lang.String out of START_OBJECT token
Posted qingmuchuanqi48
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jackson错误: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.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的主要内容,如果未能解决你的问题,请参考以下文章
无法使用 Jackson ObjectMapper 将 Json 序列化为 Java 对象
程序插入数据报错ORA-01461: can bind a LONG value only for
Spring Mvc使用Jackson进行json转对象时,遇到的字符串转日期的异常处理(JSON parse error: Can not deserialize value of type jav