首页 前端知识 Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Invalid JSON text:

Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Invalid JSON text:

2025-02-27 11:02:32 前端知识 前端哥 713 190 我要收藏

### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Invalid JSON text: "Invalid value." at position 0 in value for column 'ims_stock_in_order.extend_props'.

由于插入数据类型与我们数据库所需的数据类型不一致,所以报错

json数据类型

{
"firstName": "John", -- Key : Value 格式
"lastName": "Smith",
"sex": "male",
"age": 25,
"address": -- Key : Value ; 其中 Value 也是一个 Key-Value 的结构
{
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumber":
[
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
]
}
复制

转载请注明出处或者链接地址:https://www.qianduange.cn//article/21670.html
标签
评论
会员中心 联系我 留言建议 回顶部
复制成功!