报错:no String-argument constructor/factory method to deserialize from String value

报错如下

Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.yunsystem.common.vo.business.ModelFileVO` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('{"fileName": "action_detect_model.tflite", "version": "4", "size": "644040", "md5": "b7ad33cc81414363e978a101f1791196", "url": "https://actionrec-oss-file.oss-cn-chengdu.aliyuncs.com\\model_weights/test/action_detect_model.tflite", "addTime": "2023-06-14 17:17:34"}')
 at [Source: (PushbackInputStream); line: 1, column: 1]
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
	at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1429)
	at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1059)
	at com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:371)
	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:323)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1373)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:171)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3258)
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:239)
	... 74 common frames omitted

原因

是前后端联调接口时,前端将数据封装好json给我时 序列化了两次, 导致后台我这边接收到后反序列化失败~

你可能感兴趣的:(#,错误集锦,前端,json传参)