-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]Fastjson2-2.0.28时间格式化报错 #1393
Comments
expireTime 是Date数据类型,数据出现毫秒 就报错Json语法错误 |
我这里没有重现,能提供更完整的错误堆栈信息么? |
|
|
`package com.cashy.payment.domain.vo; import java.math.BigDecimal; import com.alibaba.fastjson2.JSONObject; import lombok.Data; @DaTa } 在Fastjson2-version-2.0.16是正常的,升级到2.0.28就会报错格式化错误 |
请问这个算bug吗?因为字符串个pattern确实不匹配呀 |
感觉有点奇怪,在2.0.16版本没有报错 |
Bean bean = JSON.parseObject(json, Bean.class, JSONReader.Feature.SupportSmartMatch); 加上SupportSmartMatch可以自动识别不匹配的格式 |
确实,加上不报错,还能正确解析 |
感谢温少,还冲锋在前线
温绍锦 ***@***.***>于2023年4月22日 周六21:14写道:
… https://github.com/alibaba/fastjson2/releases/tag/2.0.29
请用新版本
—
Reply to this email directly, view it on GitHub
<#1393 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZB46DH5NY2DN5SSH3QCP43XCPKTFANCNFSM6AAAAAAXGIN6NY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@wenshao 请教个问题,我目前用的是 |
`package com.xxx.framework.config; import java.nio.charset.Charset; /**
|
问题描述
Fastjson2-2.0.28时间格式化报错
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
com.alibaba.fastjson2.JSON.parseObject
方法VO类
数据com.alibaba.fastjson2.JSONException: illegal date input, offset 125, character ", line 1, column 126, fastjson-version 2.0.28
错误//可在此输入示例代码
相关日志输出
com.alibaba.fastjson2.JSONException: illegal date input, offset 125, character ", line 1, column 126, fastjson-version 2.0.28 {"@type":"com.cashy.payment.domain.vo.PayDeskOneCache","amount":1710000,"currency":"IDR","expireSeconds":43200,"expireTime":"2023-04-21 21:03:43.071","mchOrderNo":"16820426211962643102","merchantId":"2002088","orderNo":"PAYIN8337573427768262656","orderStatus":"PAYING","payCode":"8903909932118062","payProCode":"MandiriVA","qrCodeType":"0"}
The text was updated successfully, but these errors were encountered: