Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

希望增加对Java8中的LocalDateTime等类的格式化支持,目前只是json为toString输出,谢谢 #612

Closed
tianshuang opened this issue May 5, 2016 · 9 comments
Milestone

Comments

@tianshuang
Copy link

对LocalDateTime等类的解析也仅仅调用了LocalDateTime.parse(text)
未支持不同格式的时间解析,希望增加,谢谢

https://github.com/alibaba/fastjson/blob/master/src/main/java/com/alibaba/fastjson/parser/deserializer/Jdk8DateCodec.java

@wenshao
Copy link
Member

wenshao commented May 5, 2016

你的其他格式是怎样的?我刚增加了对"yyyy-MM-dd"格式的支持

@wenshao
Copy link
Member

wenshao commented May 6, 2016

现在修改了,如果nano为0,缺省使用JSON.DEFFAULT_DATE_FORMAT的配置yyyy-MM-dd HH:mm:ss

@tianshuang
Copy link
Author

请问现在字符串转为JSON和JSON转为字符串都支持格式“yyyy-MM-dd HH:mm:ss”吗?还有就是您最新的commit我本地是怎样才能检出为jar呢?是删除以前的jar重新导入还是有另外的快照版本? 谢谢

@wenshao
Copy link
Member

wenshao commented May 6, 2016

fastjson是标准的maven工程,你可以执行如下命令获得最新的jar

mvn clean package

@tianshuang
Copy link
Author

maven central 中是5月2日的版本,请问怎样才能获取到最新的版本?
the central repository search engine

@wenshao
Copy link
Member

wenshao commented May 6, 2016

fastjson当前在公网没有快照仓库,你只能自行编译

@tianshuang
Copy link
Author

好的,下一个realease版本大概什么时候发布?我好到时更换为realease版本。

@wenshao
Copy link
Member

wenshao commented May 6, 2016

预计到6月初

@tianshuang
Copy link
Author

好的,再次感谢 😂

@wenshao wenshao added this to the 1.2.12 milestone May 9, 2016
@wenshao wenshao closed this as completed May 21, 2016
asa1997 pushed a commit to Be-Secure/fastjson that referenced this issue Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants