首页 > 代码库 > jackson error 含义log

jackson error 含义log

1. 反序列化失败,类型不匹配

技术分享
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token at [Source: org.apache.http.conn.EofSensorInputStream@51796217; line: 1, column: 274] (through reference chain: com.expedia.lodging.domain.valueobject.poi.tip.Tip["postalAddress"])        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)        at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:691)        at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:46)        at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:11)        at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:525)
View Code

这段错误是因为给出的filed是String类型,而序列化的是字符串对应的为{},即使一个object。

jackson error 含义log