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

Json 如何忽略数字字段 #469

Closed
zozoh opened this issue Jun 5, 2013 · 5 comments
Closed

Json 如何忽略数字字段 #469

zozoh opened this issue Jun 5, 2013 · 5 comments
Assignees
Milestone

Comments

@zozoh
Copy link
Member

zozoh commented Jun 5, 2013

比如我有个字段,我想让其在 0 值时不输出,必须要在 JsonField 上做点配置

@ghost ghost assigned zozoh Jun 5, 2013
@wendal
Copy link
Member

wendal commented Jun 5, 2013

... 有意义吗?

@zozoh
Copy link
Member Author

zozoh commented Sep 3, 2013

原来有个场景,现在忘记了
下个版本要是想不起来,就关掉它

@enzozhong
Copy link
Contributor

有些数据返回到浏览器的时候都是对象来的,里面有些敏感信息不想能够在浏览器出现,所以toJSON的时候希望能够控制某些字段

@wendal
Copy link
Member

wendal commented Mar 13, 2014

50已经实现了@JsonIgnore注解.

@wendal wendal closed this as completed Mar 13, 2014
@zozoh
Copy link
Member Author

zozoh commented Mar 18, 2014

JsonTest.test_ignore_numbers 里有对应测试用例

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

No branches or pull requests

3 participants