cannot deserialize from Object value (no delegate- or property-based Creator)

Posted G_whang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cannot deserialize from Object value (no delegate- or property-based Creator)相关的知识,希望对你有一定的参考价值。

json转换的时候发生了反序列化报错:cannot deserialize from Object value (no delegate- or property-based Creator)

feign.codec.DecodeException: Type definition error: [simple type, class com.xxx.ins.smp.tpa.domain.CommonResponseHead]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.xxx.ins.smp.tpa.domain.CommonResponseHead` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

这个原因最根本的是没有找到无参构造方法,解决办法是给类加一个无参构造方法

以上是关于cannot deserialize from Object value (no delegate- or property-based Creator)的主要内容,如果未能解决你的问题,请参考以下文章

异常:Invalid JSON input: Cannot deserialize value of type `java.sql.Timestamp` from String解决方法

JSON parse error: Cannot deserialize value of type `java.util.Date` from String

JSON parse error: Cannot deserialize value of type `java.util.Date` from String

解决日期转换异常 JSON parse error: Cannot deserialize value of type `java.util.Date` from String

解决日期转换异常 JSON parse error: Cannot deserialize value of type `java.util.Date` from String

post请求 参数json序列化报错: cannot deserialize from Object value