no String-argument constructor/factory method to deserialize from String value ('2')
时间: 2023-10-20 08:29:37 浏览: 200
这个错误信息表示在解析JSON时出现了问题,无法构造一个没有String参数的构造函数或工厂方法来从字符串值('2')中反序列化。 根据引用中的描述,可能是由于在定义变量时类型不一致导致的,前端传递的JSON中的变量名为content,类型为string,但在后端定义中将其定义为Content类型。这样的定义不符合要求,因此需要对定义进行修改以匹配前端传递的数据类型。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [no String-argument constructor/factory method to deserialize from String value(‘ ‘)](https://blog.csdn.net/weixin_43608796/article/details/117557679)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [项目debug|no String-argument constructor/factory method to deserialize from String val](https://blog.csdn.net/weixin_48118167/article/details/125890421)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文