Skip to content
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

可以支持double类型数据format注解么? #971

Closed
heiliguai opened this issue Dec 29, 2016 · 2 comments
Closed

可以支持double类型数据format注解么? #971

heiliguai opened this issue Dec 29, 2016 · 2 comments
Milestone

Comments

@heiliguai
Copy link

在同一个对象中,double类型的数据可能需要输出不同的格式。比如,金额显示两位小数,价格显示三位小数。
JSONField注解的format只支持日期对象,不知道这样设计是基于什么样的考虑。

可以增加double类型格式注解支持么?
@JSONFiled(format="0.00")
private Double price;
类似这样的。

@heiliguai
Copy link
Author

JSONSerializer
public final void writeWithFormat(Object object, String format) { }

这个方法被标记为final了。

@wenshao
Copy link
Member

wenshao commented Jan 9, 2017

已经支持,预计在春节前会发布新版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants