We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Based on #1605,Fastjson在反序列化org.joda.time.DateTime时不一致
import com.alibaba.fastjson2.JSON; import org.joda.time.DateTime; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; public class Issue1605Mutated_414 { @Test public void testMutated() { String s = "{\"dateTime\":\"2023-06-27T16:53:24.123Z\"}"; BeanMutated bean = JSON.parseObject(s, BeanMutated.class); String s1 = JSON.toJSONString(bean); assertEquals("{\"dateTime\":\"2023-06-27T16:53:24.123Z\"}", s1); } @Test public void testMutatedfj() { String s = "{\"dateTime\":\"2023-06-27T16:53:24.123Z\"}"; BeanMutated bean = com.alibaba.fastjson.JSON.parseObject(s, BeanMutated.class); String s1 = com.alibaba.fastjson.JSON.toJSONString(bean); assertEquals("{\"dateTime\":\"2023-06-27T16:53:24.123Z\"}", s1); } public static class BeanMutated { public DateTime getDateTime() { return dateTime; } public void setDateTime(DateTime dateTime) { this.dateTime = dateTime; } public DateTime dateTime; } }
Fastjson 正确处理dateTime格式
Expected :{"dateTime":"2023-06-27T16:53:24.123Z"} Actual :{"dateTime":1687884804123}
The text was updated successfully, but these errors were encountered:
fix fastjson 1.x compatible api write joda DateTime, for issue #2537
df63fc2
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson/2.0.50-SNAPSHOT/ 问题已修复,请帮忙用2.0.50-SNAPSHOT版本在你本地验证下
Sorry, something went wrong.
经验证已修复,辛苦wenshao
https://github.com/alibaba/fastjson2/releases/tag/2.0.50 2.0.50已发布,请用新版本
No branches or pull requests
问题描述
Based on #1605,Fastjson在反序列化org.joda.time.DateTime时不一致
环境信息
重现步骤
期待的正确结果
Fastjson 正确处理dateTime格式
相关日志输出
Expected :{"dateTime":"2023-06-27T16:53:24.123Z"}
Actual :{"dateTime":1687884804123}
The text was updated successfully, but these errors were encountered: